From 1834e43f65c5ce2fedac1a0cb8ea3361f56108f3 Mon Sep 17 00:00:00 2001 From: Nikhil Dabas Date: Fri, 18 Sep 2026 12:26:49 +0100 Subject: Restructure MSYS2 msystem and package selection --- .github/actions/setup-msys2/action.yml | 15 +++++++++++++-- 1 file 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} -- cgit v1.2.3