diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-06-14 09:13:42 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-06-14 10:26:23 +0100 |
| commit | 91e3218eaa20be86c6485d85adbf4b21d459f7fe (patch) | |
| tree | d460c81fe20786aa769dce8a17d89cb091f56169 /.github | |
| parent | 45a641316a01b4861c887caf08058b2d48dfdc17 (diff) | |
Extract action to set up msys2
Diffstat (limited to '.github')
| -rw-r--r-- | .github/actions/setup-msys2/action.yml | 18 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 13 |
2 files changed, 21 insertions, 10 deletions
diff --git a/.github/actions/setup-msys2/action.yml b/.github/actions/setup-msys2/action.yml new file mode 100644 index 0000000..72c6e38 --- /dev/null +++ b/.github/actions/setup-msys2/action.yml @@ -0,0 +1,18 @@ +name: 'Setup msys2' +inputs: + arch: + required: true +runs: + using: "composite" + steps: + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + release: false + msystem: ${{ inputs.arch == 'x86' && 'mingw32' || 'ucrt64' }} + install: make mingw-w64-${{ inputs.arch == 'x86' && 'i686' || 'ucrt-x86_64' }}-gcc + + - name: Set PATH for x86 + if: ${{ inputs.arch == 'x86' }} + shell: msys2 {0} + run: echo "C:/msys64/mingw32/bin" >> "$GITHUB_PATH" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ff05e7..418829a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,17 +160,10 @@ jobs: with: python-version: '3.11' - - name: set up MSYS2 - uses: msys2/setup-msys2@v2 + - name: Set up MSYS2 + uses: ./.github/actions/setup-msys2 with: - release: false - msystem: ${{ matrix.arch == 'x86' && 'mingw32' || 'ucrt64' }} - install: make mingw-w64-${{ matrix.arch == 'x86' && 'i686' || 'ucrt-x86_64' }}-gcc - - - name: Set PATH for x86 - if: ${{ matrix.arch == 'x86' }} - shell: msys2 {0} - run: echo "C:/msys64/mingw32/bin" >> "$GITHUB_PATH" + arch: ${{ matrix.arch }} - name: Print build identifiers run: | |
