mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[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:
13
.github/workflows/bazel.yml
vendored
13
.github/workflows/bazel.yml
vendored
@@ -39,6 +39,7 @@ jobs:
|
||||
run: df -h
|
||||
|
||||
- name: Free disk space (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
@@ -48,8 +49,9 @@ jobs:
|
||||
large-packages: false
|
||||
docker-images: false
|
||||
swap-storage: false
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
|
||||
- name: Free disk space (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
# CodeQL: 5G
|
||||
# go: 748M
|
||||
# Android: 12G
|
||||
@@ -57,7 +59,6 @@ jobs:
|
||||
rm -rf /Users/runner/hostedtoolcache/CodeQL
|
||||
rm -rf /Users/runner/hostedtoolcache/go
|
||||
rm -rf /Users/runner/Library/Android
|
||||
if: startsWith(matrix.os, 'macOS')
|
||||
|
||||
- name: Check disk free space post-cleanup
|
||||
run: df -h
|
||||
@@ -72,10 +73,10 @@ jobs:
|
||||
password: ${{ secrets.BAZEL_CACHE_PASSWORD }}
|
||||
|
||||
- name: Install apt dependencies
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev avahi-daemon
|
||||
|
||||
- if: matrix.os == 'ubuntu-24.04'
|
||||
- if: runner.os == 'Linux'
|
||||
uses: bazel-contrib/setup-bazel@0.15.0
|
||||
with:
|
||||
bazelisk-cache: true
|
||||
@@ -85,12 +86,12 @@ jobs:
|
||||
- name: bazel ${{ matrix.action }}
|
||||
run: |
|
||||
ACTION='${{ matrix.action }}'
|
||||
if [[ "${ACTION}" == "build" ]]; then
|
||||
if [ "${ACTION}" = "build" ]; then
|
||||
TARGETS=:publish
|
||||
else
|
||||
TARGETS=...
|
||||
fi
|
||||
if [[ "${{ matrix.os }}" == "windows-2022" ]]; then
|
||||
if [ "${{ runner.os }}" = "Windows" ]; then
|
||||
bazel --output_user_root=C:\\bazelroot ${ACTION} ${TARGETS} --config=ci -c opt --repo_env=WPI_PUBLISH_CLASSIFIER_FILTER='${{ matrix.classifier }}'
|
||||
else
|
||||
bazel ${ACTION} ${TARGETS} --config=ci -c opt --repo_env=WPI_PUBLISH_CLASSIFIER_FILTER='${{ matrix.classifier }}'
|
||||
|
||||
Reference in New Issue
Block a user