-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (62 loc) · 1.96 KB
/
build.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
name: build
on:
push:
branches: [ unstable ]
pull_request:
branches: [ unstable ]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, llvm: 15, doc: ON}
- {os: ubuntu-22.04, llvm: 16, doc: OFF}
- {os: ubuntu-22.04, llvm: 17, doc: OFF}
- {os: ubuntu-22.04, llvm: 18, doc: OFF}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install ubuntu dependencies
if: matrix.os == 'ubuntu-22.04'
run: >
sudo apt-get update &&
sudo apt-get install lsb-release wget software-properties-common &&
wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh &&
chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh ${{ matrix.llvm }} &&
sudo apt-get install
ccache
clang-${{ matrix.llvm }}
llvm-${{ matrix.llvm }}-dev
libclang-${{ matrix.llvm }}-dev
libblas-dev
libomp-${{ matrix.llvm }}-dev
clang-format-${{ matrix.llvm }}
python3
python3-dev
python3-numpy
python3-scipy
python3-pip
python3-sphinx
python3-sphinx-rtd-theme
python3-sphinx-copybutton
python3-myst-parser &&
pip3 install linkify-it-py
- name: Build clair
env:
CC: clang-${{ matrix.llvm }}
CXX: clang++-${{ matrix.llvm }}
run: |
cmake -B build -S. -DLLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
cd build && make -j2 || make -j1 VERBOSE=1
- name: Test clair
run: |
cd build
ctest -j2 --output-on-failure
- name: Deploy documentation to website
if: matrix.doc == 'ON' && github.ref == 'refs/heads/unstable'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/doc/html
branch: github.io
target-folder: docs/unstable