1212
1313jobs :
1414 build :
15- name : Build
15+ name : ${{ matrix.name || matrix.runs-on }}
1616 env :
17- ACTIONS_RUNNER_DEBUG : " true"
18- ACTIONS_STEP_DEBUG : " true"
19-
17+ # ACTIONS_RUNNER_DEBUG: "true"
18+ # ACTIONS_STEP_DEBUG: "true"
19+ # https://docs.github.com/en/actions/learn-github-actions/environment-variables
20+ # https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows/
21+ WSLENV : HOSTNAME:CI:FORCE_COLOR:GITHUB_ACTION:GITHUB_ACTION_PATH/p:GITHUB_ACTION_REPOSITORY:GITHUB_WORKFLOW:GITHUB_WORKSPACE/p:GITHUB_PATH/p:GITHUB_ENV/p:VIRTUAL_ENV/p:SKIP_PODMAN:SKIP_DOCKER:NODE_OPTIONS
22+ # We define a hostname because otherwise the variable might not always be accessible on runners.
23+ HOSTNAME : gha
24+ defaults :
25+ run :
26+ shell : ${{ matrix.shell || 'bash'}}
2027 strategy :
2128 matrix :
22- runs-on : [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
29+ shell : [bash]
30+ # runs-on: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
31+ include :
32+ - runs-on : windows-2025
33+ name : wsl
34+ - runs-on : windows-2025
35+ # - runs-on: ubuntu-24.04
36+ # - runs-on: ubuntu-24.04-arm
37+ # - runs-on: macos-15
2338 fail-fast : false
2439
2540 runs-on : ${{ matrix.runs-on }}
2641
2742 steps :
43+ # https://github.com/marketplace/actions/setup-wsl
44+ - name : Activate WSL
45+ if : contains(matrix.name, 'wsl') && (matrix.runs-on || '') != 'self-hosted'
46+ uses : Vampire/setup-wsl@v6.0.0
47+ with :
48+ distribution : Ubuntu-24.04
49+ set-as-default : " true"
50+ # '-i' seems to be the only option that loads .bashrc file that we need
51+ # https://github.com/Vampire/setup-wsl/discussions/54
52+ wsl-shell-command : " bash -i -eo pipefail"
53+ # https://github.com/MicrosoftDocs/WSL/blob/main/WSL/wsl-config.md#L159
54+ wsl-conf : |
55+ [automount]
56+ enabled = true
57+ root = /
58+ options = "metadata,umask=077"
59+ [boot]
60+ command=/etc/init.d/dbus start
61+ [interop]
62+ enabled = false
63+ appendWindowsPath = false
64+ [network]
65+ hostname = wsl
66+ additional-packages : curl
67+ xvfb
68+ # asdf nodejs plugin requires: dirmngr gpg curl gawk
2869
2970 - name : Checkout
3071 uses : actions/checkout@v4
@@ -62,21 +103,21 @@ jobs:
62103 - name : ' Upload artifact #1'
63104 uses : ./
64105 with :
65- name : ' Artifact-A-${{ matrix.runs-on }}'
106+ name : ' Artifact-A-${{ github.job }}'
66107 path : path/to/dir-1/file1.txt
67108
68109 # Upload using a wildcard pattern
69110 - name : ' Upload artifact #2'
70111 uses : ./
71112 with :
72- name : ' Artifact-Wildcard-${{ matrix.runs-on }}'
113+ name : ' Artifact-Wildcard-${{ github.job }}'
73114 path : path/**/dir*/
74115
75116 # Upload a multi-path artifact
76117 - name : ' Upload artifact #3'
77118 uses : ./
78119 with :
79- name : ' Multi-Path-Artifact-${{ matrix.runs-on }}'
120+ name : ' Multi-Path-Artifact-${{ github.job }}'
80121 path : |
81122 path/to/dir-1/*
82123 path/to/dir-[23]/*
85126 - name : ' Upload symlinked artifact'
86127 uses : ./
87128 with :
88- name : ' Symlinked-Artifact-${{ matrix.runs-on }}'
129+ name : ' Symlinked-Artifact-${{ github.job }}'
89130 path : |
90131 symlink/abs.txt
91132 symlink/rel.txt
94135 - name : ' Download artifact #1'
95136 uses : actions/download-artifact@v4
96137 with :
97- name : ' Artifact-A-${{ matrix.runs-on }}'
138+ name : ' Artifact-A-${{ github.job }}'
98139 path : some/new/path
99140
100141 - name : ' Verify Artifact #1'
@@ -114,7 +155,7 @@ jobs:
114155 - name : ' Download artifact #2'
115156 uses : actions/download-artifact@v4
116157 with :
117- name : ' Artifact-Wildcard-${{ matrix.runs-on }}'
158+ name : ' Artifact-Wildcard-${{ github.job }}'
118159 path : some/other/path
119160
120161 - name : ' Verify Artifact #2'
@@ -135,7 +176,7 @@ jobs:
135176 - name : ' Download artifact #3'
136177 uses : actions/download-artifact@v4
137178 with :
138- name : ' Artifact-Wildcard-${{ matrix.runs-on }}'
179+ name : ' Artifact-Wildcard-${{ github.job }}'
139180 path : verify-artifact-3
140181
141182 - name : ' Verify Artifact #3'
@@ -156,7 +197,7 @@ jobs:
156197 - name : ' Download artifact #4'
157198 uses : actions/download-artifact@v4
158199 with :
159- name : ' Multi-Path-Artifact-${{ matrix.runs-on }}'
200+ name : ' Multi-Path-Artifact-${{ github.job }}'
160201 path : multi/artifact
161202
162203 - name : ' Verify Artifact #4'
@@ -176,7 +217,7 @@ jobs:
176217 - name : ' Download symlinked artifact'
177218 uses : actions/download-artifact@v4
178219 with :
179- name : ' Symlinked-Artifact-${{ matrix.runs-on }}'
220+ name : ' Symlinked-Artifact-${{ github.job }}'
180221 path : from/symlink
181222
182223 - name : ' Verify symlinked artifact'
@@ -209,15 +250,15 @@ jobs:
209250 - name : ' Overwrite artifact #1'
210251 uses : ./
211252 with :
212- name : ' Artifact-A-${{ matrix.runs-on }}'
253+ name : ' Artifact-A-${{ github.job }}'
213254 path : path/to/dir-1/file1.txt
214255 overwrite : true
215256
216257 # Download replaced Artifact #1 and verify the correctness of the content
217258 - name : ' Download artifact #1 again'
218259 uses : actions/download-artifact@v4
219260 with :
220- name : ' Artifact-A-${{ matrix.runs-on }}'
261+ name : ' Artifact-A-${{ github.job }}'
221262 path : overwrite/some/new/path
222263
223264 - name : ' Verify Artifact #1 again'
0 commit comments