-
Notifications
You must be signed in to change notification settings - Fork 157
93 lines (85 loc) · 2.84 KB
/
bazeltest.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Bazel
on:
push:
# Run post-submit tests when pushing to master.
branches:
- master
pull_request:
jobs:
# Run tests with Bazel v5.3.0.
test:
name: Test with Bazel
runs-on: ubuntu-22.04
strategy:
matrix:
# Hardware optimizers.
hardware_opt: [avx,sse,basic]
# Optimizers for parallelism.
parallel_opt: [openmp,nopenmp]
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Bazel on CI
run: |
wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
- name: Install requirements
run: |
python3 -m pip install -r requirements.txt
- name: Run C++ tests
run: |
bazel test --config=${{ matrix.hardware_opt }} \
--config=${{ matrix.parallel_opt }} tests:all
- name: Run sample simulation
run: |
bazel run --config=${{ matrix.hardware_opt }} \
--config=${{ matrix.parallel_opt }} apps:qsim_base \
-- -c circuits/circuit_q24
test-san:
name: Sanitizer tests
runs-on: ubuntu-22.04
strategy:
matrix:
# Test sanitizers
sanitizer_opt: [msan,asan]
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Bazel on CI
run: |
wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
- name: Install requirements
run: |
python3 -m pip install -r requirements.txt
- name: Upgrade libc
# An LLVM update broke this test, fix per is https://bugs.llvm.org/show_bug.cgi?id=27310.
run: |
sudo apt update
sudo apt-get upgrade libc-bin
- name: Run C++ tests
run: |
bazel test --config=avx --config=openmp \
--config=${{ matrix.sanitizer_opt }} tests:all
test-mem:
name: Test with tcmalloc
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Bazel on CI
run: |
wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
- name: Install requirements
run: |
python3 -m pip install -r requirements.txt
- name: Install google-perftools for tcmalloc
run: sudo apt-get install libgoogle-perftools-dev
- name: Run C++ tests
run: |
bazel test --config=avx --config=openmp \
--config=tcmalloc tests:all