-
Notifications
You must be signed in to change notification settings - Fork 40
/
action.yml
35 lines (33 loc) · 949 Bytes
/
action.yml
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
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 clang32 clang64'
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
run: |
import os
icons = {
'msys': '🟪',
'mingw32': '⬛',
'mingw64': '🟦',
'ucrt64': '🟨',
'clang32': '🟫',
'clang64': '🟧',
}
jobs = [
{'sys': sys.lower(), 'icon': icons[sys.lower()]}
for sys in '${{ inputs.systems }}'.split(' ')
]
with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as h:
h.write(f"jobs={jobs!s}\n")