-
Notifications
You must be signed in to change notification settings - Fork 11
81 lines (74 loc) · 1.98 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
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "linux debug g++",
os: ubuntu-latest,
build_type: "DEBUG",
cxx: "g++-12",
std: 20,
benchmarks: "OFF",
generators: "Ninja"
}
- {
name: "linux release g++",
os: ubuntu-latest,
build_type: "RELEASE",
cxx: "g++-12",
std: 20,
benchmarks: "ON",
generators: "Ninja"
}
- {
name: "linux debug clang++",
os: ubuntu-latest,
build_type: "DEBUG",
cxx: "clang++-15",
std: 20,
benchmarks: "OFF",
generators: "Ninja"
}
- {
name: "linux release clang++",
os: ubuntu-latest,
build_type: "RELEASE",
cxx: "clang++-15",
std: 20,
benchmarks: "ON",
generators: "Ninja"
}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake g++-12 clang++-15 libboost-all-dev
- name: configure
shell: bash
run: |
mkdir build
cmake \
-S . \
-B build \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_CXX_STANDARD=${{ matrix.config.std }} \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DMPH_BUILD_BENCHMARKS=${{ matrix.config.benchmarks }} \
-G "${{ matrix.config.generators }}"
- name: build
shell: bash
run: cmake --build build --config ${{ matrix.config.build_type }}