summaryrefslogtreecommitdiff
path: root/.github/actions/setup-msys2/action.yml
diff options
context:
space:
mode:
authorNikhil Dabas <nikhil@nikhildabas.com>2026-09-18 12:26:49 +0100
committerMichael Williamson <mike@zwobble.org>2026-10-17 10:15:25 +0100
commit1834e43f65c5ce2fedac1a0cb8ea3361f56108f3 (patch)
tree6570953e05709a04de6da72008e8e52ca682ac1b /.github/actions/setup-msys2/action.yml
parent0b583059f041ca6de8ec28cae39a489f913a6009 (diff)
Restructure MSYS2 msystem and package selection
Diffstat (limited to '.github/actions/setup-msys2/action.yml')
-rw-r--r--.github/actions/setup-msys2/action.yml15
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}