Skip to content

Commit

Permalink
Run build on default Windows runner, update GHA actions, skip deploym…
Browse files Browse the repository at this point in the history
…ent for PR branches
  • Loading branch information
Blackhex committed Feb 6, 2024
1 parent 20478cf commit 5bdf979
Showing 1 changed file with 54 additions and 48 deletions.
102 changes: 54 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build MinGW and MSYS2 toolchain

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
msys2_packages_branch:
Expand All @@ -15,10 +19,11 @@ defaults:

env:
MSYS2_REPO: Windows-on-ARM-Experiments/MSYS2-packages
MSYS2_BRANCH: ${{ inputs.msys2_packages_branch || 'woarm64' }}

jobs:
mingw-w64-cross-headers:
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -34,23 +39,23 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages

- name: Build mingw-w64-cross-headers
working-directory: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-headers
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force

- name: Upload mingw-w64-cross-headers
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-headers
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-headers/*.pkg.tar.zst

mingw-w64-cross-binutils:
needs: [mingw-w64-cross-headers]
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -66,11 +71,11 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH}}
path: ${{ github.workspace }}/MSYS2-packages

- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers

Expand All @@ -82,15 +87,15 @@ jobs:
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --nocheck --force

- name: Upload mingw-w64-cross-binutils
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-binutils
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-binutils/*.pkg.tar.zst

mingw-w64-cross-gcc-stage1:
needs: [mingw-w64-cross-headers, mingw-w64-cross-binutils]
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -106,16 +111,16 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages

- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers

- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils

Expand All @@ -127,15 +132,15 @@ jobs:
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force

- name: Upload mingw-w64-cross-gcc-stage1
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1
retention-days: 1
path: ${{ github.workspace }}/MSYS2-packages/mingw-w64-cross-gcc-stage1/*.pkg.tar.zst

mingw-w64-cross-windows-default-manifest:
needs: [mingw-w64-cross-binutils, mingw-w64-cross-gcc-stage1]
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -151,16 +156,16 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages

- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils

- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1

Expand All @@ -172,7 +177,7 @@ jobs:
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force

- name: Upload mingw-w64-cross-windows-default-manifest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-windows-default-manifest
retention-days: 1
Expand All @@ -185,7 +190,7 @@ jobs:
mingw-w64-cross-binutils,
mingw-w64-cross-gcc-stage1,
]
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -203,21 +208,21 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages

- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers

- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils

- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1

Expand All @@ -235,7 +240,7 @@ jobs:
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force

- name: Upload mingw-w64-cross-crt
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-crt
retention-days: 1
Expand All @@ -249,7 +254,7 @@ jobs:
mingw-w64-cross-gcc-stage1,
mingw-w64-cross-crt,
]
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -265,26 +270,26 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages

- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers

- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils

- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1

- name: Download mingw-w64-cross-crt
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-crt

Expand All @@ -296,7 +301,7 @@ jobs:
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force

- name: Upload mingw-w64-cross-winpthreads
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-winpthreads
retention-days: 1
Expand All @@ -311,7 +316,7 @@ jobs:
mingw-w64-cross-crt,
mingw-w64-cross-winpthreads,
]
runs-on: [Windows, X64, self-hosted]
runs-on: windows-latest

steps:
- uses: msys2/setup-msys2@v2
Expand All @@ -327,31 +332,31 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ env.MSYS2_REPO }}
ref: ${{ github.event.inputs.msys2_packages_branch }}
ref: ${{ env.MSYS2_BRANCH }}
path: ${{ github.workspace }}/MSYS2-packages

- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers

- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils

- name: Download mingw-w64-cross-windows-default-manifest
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-windows-default-manifest

- name: Download mingw-w64-cross-crt
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-crt

- name: Download mingw-w64-cross-winpthreads
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-winpthreads

Expand All @@ -363,7 +368,7 @@ jobs:
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --force

- name: Upload mingw-w64-cross-gcc
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mingw-w64-cross-gcc
retention-days: 1
Expand All @@ -386,37 +391,37 @@ jobs:
- uses: msys2/setup-msys2@v2

- name: Download mingw-w64-cross-headers
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-headers

- name: Download mingw-w64-cross-binutils
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-binutils

- name: Download mingw-w64-cross-gcc-stage1
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc-stage1

- name: Download mingw-w64-cross-windows-default-manifest
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-windows-default-manifest

- name: Download mingw-w64-cross-crt
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-crt

- name: Download mingw-w64-cross-winpthreads
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-winpthreads

- name: Download mingw-w64-cross-gcc
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: mingw-w64-cross-gcc

Expand All @@ -442,6 +447,7 @@ jobs:
path: "."

deploy:
if: github.ref == 'refs/heads/main'
needs: [repository]
runs-on: ubuntu-latest

Expand All @@ -460,10 +466,10 @@ jobs:

steps:
- name: Setup GitHub Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
with:
artifact_name: woarm64-msys2-repository

0 comments on commit 5bdf979

Please sign in to comment.