diff options
Diffstat (limited to '.github/actions/setup-msys2/action.yml')
| -rw-r--r-- | .github/actions/setup-msys2/action.yml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.github/actions/setup-msys2/action.yml b/.github/actions/setup-msys2/action.yml index 35bd777..fce7c3d 100644 --- a/.github/actions/setup-msys2/action.yml +++ b/.github/actions/setup-msys2/action.yml @@ -1,7 +1,17 @@ name: 'Setup msys2' +description: 'Install an MSYS2 toolchain targeting the given architecture.' inputs: arch: + description: 'Target architecture: x86 or AMD64' required: true + toolchains: + description: 'Lookup table mapping the target architecture to an MSYS2 environment and pacboy compiler packages.' + required: false + default: >- + { + "x86": {"msystem": "mingw32", "packages": ["gcc:p"]}, + "AMD64": {"msystem": "ucrt64", "packages": ["gcc:p"]}, + } runs: using: "composite" steps: @@ -9,8 +19,9 @@ runs: id: set-up-msys2 uses: msys2/setup-msys2@v2 with: - msystem: ${{ inputs.arch == 'x86' && 'mingw32' || 'ucrt64' }} - install: make mingw-w64-${{ inputs.arch == 'x86' && 'i686' || 'ucrt-x86_64' }}-gcc patch + msystem: ${{ fromJSON(inputs.toolchains)[inputs.arch].msystem }} + install: make patch + pacboy: ${{ join(fromJSON(inputs.toolchains)[inputs.arch].packages, ' ') }} - name: Add MSYS2 toolchain to PATH shell: msys2 {0} |
