1- # ref: https://github.com/actions/runner-images
21name : build_and_test
32
43# Controls when the action will run.
5- on : [push, pull_request, workflow_dispatch]
4+ on :
5+ # Triggers the workflow on push or pull request events but only for the master branch
6+ push :
7+ branches : [ master ]
8+ pull_request :
9+ branches : [ master ]
10+ # Allows you to run this workflow manually from the Actions tab
11+ workflow_dispatch :
612
713env :
814 PIP_BREAK_SYSTEM_PACKAGES : 1
915
1016# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1117jobs :
18+
1219 unix :
1320 strategy :
1421 fail-fast : false
@@ -23,21 +30,28 @@ jobs:
2330 steps :
2431 - name : Show env
2532 run : env
33+
2634 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27- - uses : actions/checkout@v4
35+ - uses : actions/checkout@v3
2836
29- - name : Setup bazel
37+ - name : Install bazel
3038 if : matrix.build_tool == 'bazel'
31- uses :
bazel-contrib/[email protected] 32- with :
33- bazelisk-cache : true
34- disk-cache : ${{ github.workflow }}
35- repository-cache : true
39+ # Install Bazel, see https://docs.bazel.build/versions/master/install-ubuntu.html#step-1-install-required-packages
40+ run : |
41+ sudo apt install curl gnupg
42+ curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
43+ sudo mv bazel.gpg /etc/apt/trusted.gpg.d/
44+ echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
45+ sudo apt update && sudo apt install bazel -y
3646
3747 - name : Show bazel version
3848 if : matrix.build_tool == 'bazel'
3949 run : bazel --version
4050
51+ - name : Update cmake
52+ if : matrix.build_tool == 'cmake'
53+ 54+
4155 - name : Show cmake version
4256 if : matrix.build_tool == 'cmake'
4357 run : cmake --version
0 commit comments