Skip to content

Commit 9439b55

Browse files
authored
Disconnect the CI OS detection from the OS version. (#776)
The current `matrix.os == 'ubuntu-latest'` expression works, but will fail if we for some reason need to switch to explicitly use e.g. `ubuntu-24.04`. Doing the same check via `runner.os == 'Linux'` disconnects the check from the specific OS version.
1 parent 3d2dd78 commit 9439b55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
tool: cargo-hack
126126

127127
- name: Install native dependencies
128-
if: matrix.os == 'ubuntu-latest'
128+
if: runner.os == 'Linux'
129129
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
130130

131131
- name: Restore cache
@@ -255,12 +255,12 @@ jobs:
255255
toolchain: ${{ env.RUST_STABLE_VER }}
256256

257257
- name: Install native dependencies
258-
if: matrix.os == 'ubuntu-latest'
258+
if: runner.os == 'Linux'
259259
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
260260

261261
# Adapted from https://github.com/bevyengine/bevy/blob/b446374392adc70aceb92621b080d1a6cf7a7392/.github/workflows/validation-jobs.yml#L74-L79
262262
- name: Install xvfb, llvmpipe and lavapipe
263-
if: matrix.os == 'ubuntu-latest'
263+
if: runner.os == 'Linux'
264264
# https://launchpad.net/~kisak/+archive/ubuntu/turtle
265265
run: |
266266
sudo apt-get update -y -qq
@@ -366,7 +366,7 @@ jobs:
366366
tool: cargo-hack
367367

368368
- name: Install native dependencies
369-
if: matrix.os == 'ubuntu-latest'
369+
if: runner.os == 'Linux'
370370
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
371371

372372
- name: Restore cache

0 commit comments

Comments
 (0)