-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (58 loc) · 1.59 KB
/
lint_and_test.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: Lint and Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
clang-formatting:
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: clang-format
run: |
bash ./scripts/clang_format_all.sh
git diff --exit-code
build-and-test:
strategy:
matrix:
compiler: [gcc-11, clang-17]
runs-on: ubuntu-22.04-4-cores
environment: LOCAL
env:
GIT_LFS_SKIP_SMUDGE: 1
steps:
- name: Check out code
uses: actions/checkout@v4
with:
filter: 'blob:none'
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install python libraries
run: pip install -r requirements.txt
- name: Install Boost Library
run: sudo apt install libboost-all-dev
- name: Install GCC-11 & Configure
if: matrix.compiler == 'gcc-11'
run: |
sudo bash ./scripts/install_gcc_11.sh
make configure
- name: Install Clang-17 & Configure
if: matrix.compiler == 'clang-17'
run: |
/home/linuxbrew/.linuxbrew/bin/brew install llvm@17
make configure
env:
CC: /home/linuxbrew/.linuxbrew/bin/clang
CXX: /home/linuxbrew/.linuxbrew/bin/clang++
CXXFLAGS: --gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/12
- name: C++ tests
run: make test