-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (72 loc) · 2.56 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 and test
on:
pull_request:
branches:
- main
jobs:
build-linux:
runs-on: ubuntu-24.04
strategy:
matrix:
compiler: [gcc-9, gcc-14, clang-9, clang-19]
include:
- compiler: gcc-9
cxx: g++-9
libcxx: libstdc++11
install: |
sudo apt install -y gcc-9 g++-9
- compiler: gcc-14
cxx: g++-14
libcxx: libstdc++11
- compiler: clang-9
cxx: clang++-9
libcxx: libc++
install: |
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu focal main universe'
sudo apt install -y clang-9 libc++-9-dev libc++abi-9-dev
- compiler: clang-19
cxx: clang++-19
libcxx: libc++
install: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
sudo apt install -y clang-19 libc++-19-dev libc++abi-19-dev
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
${{ matrix.install }}
- name: Build
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cxx }}
LIBCXX: ${{ matrix.libcxx }}
run: |
python -m venv venv
source ./venv/bin/activate
pip install conan
source ~/.profile
conan config install --type dir ./.github/conan_config
conan install . -of=build --build=missing
cmake -B build -DSBEPP_BUILD_TESTS=ON -DSBEPP_SEPARATE_TESTS=OFF --preset conan-debug
cmake --build build --preset conan-debug --parallel $(nproc)
- name: Run tests
run: ctest --test-dir build --output-on-failure --parallel --build-config Debug
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Build
run: |
python -m venv venv
.\venv\Scripts\activate
pip install conan
conan profile detect
conan profile show
conan install . -of=build --build=missing -s build_type=Debug
cmake -B build -DSBEPP_BUILD_TESTS=ON -DSBEPP_SEPARATE_TESTS=OFF --preset conan-default
$threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
cmake --build build --preset conan-debug --parallel $threads
- name: Run tests
run: ctest --test-dir build --output-on-failure --parallel --build-config Debug