Update bazel-contrib/.github action to v7 (#126) #842
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109 | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-14, windows-2022] | |
bazelversion: [6.5.0, latest, last_green] | |
folder: [examples] | |
include: | |
- os: ubuntu-22.04 | |
bazelversion: latest | |
folder: "." | |
- os: windows-2022 | |
bazelversion: 6.5.0 | |
test_args: "-- -//sh:test -//args_location_expansion:doubly_transitioned_test" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure Bazel version | |
working-directory: ${{ matrix.folder }} | |
run: echo "${{ matrix.bazelversion }}" > .bazelversion | |
- name: Install and add ASAN runtime DLL to PATH on Windows | |
if: matrix.os == 'windows-2022' && matrix.folder == 'examples' | |
run: | | |
Start-Process "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList 'modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --add Microsoft.VisualStudio.Component.VC.ASAN' -Wait -PassThru | |
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC" | |
dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64" | |
echo "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: bazel test //... | |
working-directory: ${{ matrix.folder }} | |
shell: bash | |
run: bazel test --config=ci //... ${{ matrix.test_args }} | |
- name: bazel coverage //... | |
if: matrix.os == 'ubuntu-22.04' && matrix.folder == 'examples' | |
working-directory: ${{ matrix.folder }} | |
run: bazel coverage --config=ci //... |