-
-
Notifications
You must be signed in to change notification settings - Fork 3
83 lines (66 loc) · 1.79 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
72
73
74
75
76
77
78
79
80
81
82
83
name: Build
on:
push:
branches:
- main
paths-ignore:
- '*.md'
pull_request:
branches:
- main
paths-ignore:
- '*.md'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-20.04, windows-latest]
python-version: [3.9]
env:
CONAN_HOME: ${{ github.workspace }}/.conan-home
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Linux - Install prerequisites
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install gcc-11 g++-11
- name: Create virtual environment
run: python3 -m venv .pyenv
- name: Windows - Activate virtual environment
if: runner.os == 'Windows'
run: .pyenv\Scripts\activate.bat
- name: Unix - Activate virtual environment
if: runner.os != 'Windows'
run: source .pyenv/bin/activate
- name: Setup environment
run: |
pip3 install wheel
pip3 install -r requirements.txt
conan profile detect
- name: Conan Install
run: |
python3 build.py conan-install --with-tests
- name: Cache libclang
id: cache-libclang
uses: actions/cache@v3
env:
cache-name: cache-libclang
with:
path: .build/_deps/libclang-subbuild/libclang-populate-prefix/src/*.7z
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('libclang/libclang-urls.txt') }}
- name: Configure
run: |
python3 build.py configure --with-tests
- name: Build
run: |
python3 build.py build
- name: Test
run: |
cd .build
ctest --verbose --output-on-failure