-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (56 loc) · 1.7 KB
/
linux-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "linux"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test-ubuntu:
name: Build and Test (Ubuntu)
runs-on: ubuntu-latest
env:
BAZEL: bazelisk-linux-amd64
USE_BAZEL_VERSION: 6.4.0
CC: gcc-10
CXX: g++-10
steps:
- uses: actions/checkout@v3
- name: Mount bazel cache
uses: actions/cache@v3
with:
# See https://docs.bazel.build/versions/master/output_directories.html
path: "~/.cache/bazel"
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE.bazel') }}
restore-keys: ${{ runner.os }}-bazel
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/latest/download/$BAZEL"
chmod +x $BAZEL
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install -y python3-pip python3-dev
sudo pip install --upgrade pip
sudo pip install -r ./requirements.txt
- name: Environment variables (debug dump)
run: |
echo "====== gcc version:"
gcc --version
echo "====== Requested gcc:"
${CC} --version
echo "====== g++ version:"
g++ --version
echo "====== Requested g++:"
${CXX} --version
- name: Cleanup disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Build
run: |
./$BAZEL run //:requirements.update
./$BAZEL build -c opt //...
- name: Test
run: ./$BAZEL test -c opt --test_size_filters=-large,-enormous --test_output=errors //nisaba/...