[ci] Don't check matrix.os when runner.os suffices (#8863)

There's no real need to manually check the `runs-on`, as `runner.os`
provides a universally identifiable string for checking this anyways.

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter
2026-05-06 20:30:50 -04:00
committed by GitHub
parent e40ca392c3
commit b10bc0a674
3 changed files with 14 additions and 13 deletions

View File

@@ -130,12 +130,13 @@ jobs:
if: |
matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main')
- name: Check disk free space (Windows)
if: runner.os == 'Windows'
run: wmic logicaldisk get caption, freespace
if: matrix.os == 'windows-2022'
- name: Check disk free space pre-cleanup (macOS)
if: runner.os == 'macOS'
run: df -h .
if: matrix.os == 'macOS-15'
- name: Cleanup disk space
if: runner.os == 'macOS'
# CodeQL: 5G
# go: 748M
# Android: 12G
@@ -143,10 +144,9 @@ jobs:
rm -rf /Users/runner/hostedtoolcache/CodeQL
rm -rf /Users/runner/hostedtoolcache/go
rm -rf /Users/runner/Library/Android
if: matrix.os == 'macOS-15'
- name: Check disk free space post-cleanup (macOS)
if: runner.os == 'macOS'
run: df -h .
if: matrix.os == 'macOS-15'
- name: Build with Gradle
run: ./gradlew ${{ matrix.task }} -PbuildServer -PskipJavaFormat ${{ matrix.build-options }}
- name: Sign Libraries with Developer ID
@@ -154,11 +154,11 @@ jobs:
if: |
matrix.artifact-name == 'macOS' && (github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main')
- name: Check disk free space (Windows)
if: runner.os == 'Windows'
run: wmic logicaldisk get caption, freespace
if: matrix.os == 'windows-2022'
- name: Check disk free space (macOS)
if: runner.os == 'macOS'
run: df -h .
if: matrix.os == 'macOS-15'
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}