-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathaction.yml
More file actions
40 lines (38 loc) · 1.13 KB
/
action.yml
File metadata and controls
40 lines (38 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Matrix
inputs:
systems:
description: 'Space separated list of systems to build and test the tool on.'
required: false
type: string
default: 'msys mingw32 mingw64 ucrt64 clang64 clangarm64'
outputs:
jobs:
description: "List of MSYS2 systems to be used in the matrix of other jobs."
value: ${{ steps.jobs.outputs.jobs }}
runs:
using: 'composite'
steps:
- name: Generate list of jobs
shell: python
id: jobs
env:
INPUT_SYSTEMS: ${{ inputs.systems }}
run: |
import os
icons = {
'msys': '🟪',
'mingw32': '⬛',
'mingw64': '🟦',
'ucrt64': '🟨',
'clang64': '🟧',
'clangarm64': '🟩',
}
jobs = [
{
'sys': sys.lower(),
'icon': icons[sys.lower()],
'runs-on': 'windows-11-arm' if sys.lower() == 'clangarm64' else 'windows-latest',
} for sys in os.environ['INPUT_SYSTEMS'].split(' ')
]
with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as h:
h.write(f"jobs={jobs!s}\n")