-
Notifications
You must be signed in to change notification settings - Fork 20
167 lines (164 loc) · 4.94 KB
/
main.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: CI
env:
BUILD_TYPE: Debug Release
on: [push, pull_request, workflow_dispatch]
jobs:
ubuntu:
runs-on: ubuntu-latest
container:
ghcr.io/jll63/yomm2-gha:latest
strategy:
matrix:
compiler: [clang++-15, clang++-16, g++-12, g++-13]
standard: [17, 20]
config: [Debug, Release]
steps:
- uses: actions/checkout@v3
- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DYOMM2_ENABLE_TESTS=1 -DYOMM2_ENABLE_BENCHMARKS=1
- name: Build
run: VERBOSE=1 cmake --build build -j 8
- name: Unit Tests
run: |
cd build
YOMM2_TRACE=1 ctest --rerun-failed --output-on-failure .
- name: Examples
run: |
cd build/examples
YOMM2_TRACE=1 find . -type f -executable -exec {} \;
ubuntu-shared:
runs-on: ubuntu-latest
container:
ghcr.io/jll63/yomm2-gha:latest
strategy:
matrix:
compiler: [clang++-16, g++-13]
check_abi_compatibility: [OFF, ON]
steps:
- uses: actions/checkout@v3
- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DYOMM2_SHARED=1 -DYOMM2_CHECK_ABI_COMPATIBILITY=${{ matrix.check_abi_compatibility }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=17 -DYOMM2_ENABLE_TESTS=1
- name: Build
run: VERBOSE=1 cmake --build build
- name: Unit Tests
run: |
cd build
ctest --rerun-failed --output-on-failure .
- name: Examples
run: |
pwd
cd build/examples
find . -type f -executable -exec {} \;
ubuntu-cmake:
runs-on: ubuntu-latest
container:
ghcr.io/jll63/yomm2-gha:latest
strategy:
matrix:
compiler: [clang++-16, g++-13]
steps:
- uses: actions/checkout@v3
- name: Add git, remove Boost and Google Benchmarks
run: |
apt-get update
apt-get install -y git
apt-get remove -y libbenchmark-dev libboost-all-dev
- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DYOMM2_SHARED=1 -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=17 -DYOMM2_ENABLE_TESTS=1
- name: Build
run: VERBOSE=1 cmake --build build
- name: Unit Tests
run: |
cd build
ctest --rerun-failed --output-on-failure .
- name: Examples
run: |
pwd
cd build/examples
find . -type f -executable -exec {} \;
windows:
runs-on: windows-latest
strategy:
matrix:
config: [Debug, Release]
standard: [17, 20]
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: 2022
- name: Configure
run: |
mkdir build
cd build
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DYOMM2_ENABLE_TESTS=1
- name: Build
run: |
cd build
nmake
- name: Unit Tests
run: |
cd build
$env:YOMM2_TRACE = 1
ctest --rerun-failed --output-on-failure .
$global:LASTEXITCODE = 0
windows-shared:
strategy:
matrix:
check_abi_compatibility: [OFF, ON]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: 2022
- name: Configure
run: |
mkdir build
cd build
cmake .. -G "NMake Makefiles" -DYOMM2_SHARED=1 -DCMAKE_BUILD_TYPE=Release -DYOMM2_CHECK_ABI_COMPATIBILITY=${{ matrix.check_abi_compatibility }} -DCMAKE_CXX_STANDARD=17 -DYOMM2_ENABLE_TESTS=1
- name: Build
run: |
cd build
nmake
- name: Unit Tests
run: |
cd build
$env:YOMM2_TRACE = 1
$env:PATH += ";" + (Get-Item .).FullName + "/src"
ctest --rerun-failed --output-on-failure .
$global:LASTEXITCODE = 0
mac:
runs-on: macOS-latest
strategy:
matrix:
# config: [Debug, Release, ReleaseDebug, DebugRelease]
config: [Debug, Release]
steps:
- uses: actions/checkout@v3
- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DYOMM2_ENABLE_TESTS=1 -DYOMM2_ENABLE_BENCHMARKS=1
- name: Build
run: |
cd build
make
- name: Unit Tests
run: |
cd build
ctest --rerun-failed --output-on-failure .
- name: Examples
run: |
cd build/examples
find . -type f -perm +0111 -exec {} \;