-
Notifications
You must be signed in to change notification settings - Fork 6
174 lines (163 loc) · 4.69 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
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
168
169
170
171
172
173
174
name: build
on:
push:
branches: [master]
pull_request:
branches: [master]
defaults:
run:
shell: bash
jobs:
build:
name: Build
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- {
name: Ubuntu GCC Release Shared,
os: ubuntu-latest,
cc: gcc,
cxx: g++,
build-type: Release,
shared: ON,
}
- {
name: Ubuntu GCC Debug Static,
os: ubuntu-latest,
cc: gcc,
cxx: g++,
build-type: Debug,
shared: OFF,
}
- {
name: Ubuntu Clang Release Shared,
os: ubuntu-latest,
cc: clang,
cxx: clang++,
build-type: Release,
shared: ON,
}
- {
name: Ubuntu Clang Debug Static,
os: ubuntu-latest,
cc: clang,
cxx: clang++,
build-type: Debug,
shared: OFF,
}
# TODO: remove version specifiers after macos-latest upgrades to version 13
- {
name: macOS GCC Release Shared,
os: macos-13,
cc: gcc,
cxx: g++,
build-type: Release,
shared: ON,
}
- {
name: macOS GCC Debug Static,
os: macos-13,
cc: gcc,
cxx: g++,
build-type: Debug,
shared: OFF,
}
- {
name: macOS Clang Release Shared,
os: macos-13,
cc: clang,
cxx: clang++,
build-type: Release,
shared: ON,
}
- {
name: macOS Clang Debug Static,
os: macos-13,
cc: clang,
cxx: clang++,
build-type: Debug,
shared: OFF,
}
- {
name: Windows GCC Release Shared,
os: windows-latest,
cc: gcc,
cxx: g++,
build-type: Release,
shared: ON,
}
- {
name: Windows GCC Debug Static,
os: windows-latest,
cc: gcc,
cxx: g++,
build-type: Debug,
shared: OFF,
}
- {
name: Windows Clang Release Shared,
os: windows-latest,
cc: clang,
cxx: clang++,
build-type: Release,
shared: ON,
}
- {
name: Windows Clang Debug Static,
os: windows-latest,
cc: clang,
cxx: clang++,
build-type: Debug,
shared: OFF,
}
- {
name: Windows MSVC Release Shared,
os: windows-latest,
cc: msvc,
cxx: msvc,
build-type: Release,
shared: ON,
}
- {
name: Windows MSVC Debug Static,
os: windows-latest,
cc: msvc,
cxx: msvc,
build-type: Debug,
shared: OFF,
}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "true"
# TODO: remove this step after the default Clang is updated to version 16
- name: Install LLVM and Clang on Ubuntu
if: startsWith(matrix.config.os, 'ubuntu')
uses: KyleMayes/install-llvm-action@v2
with:
version: "16.0"
- name: Install GMP and MPFR on Ubuntu
if: startsWith(matrix.config.os, 'ubuntu')
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libgmp-dev libmpfr-dev
- name: Install GMP and MPFR on macOS
if: startsWith(matrix.config.os, 'macos')
run: |
brew update
brew install gmp mpfr
- name: Configure CMake
working-directory: ${{github.workspace}}
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} -Dfintamath_build_shared=${{matrix.config.shared}} -Dfintamath_build_tests=ON -Dfintamath_warnings_as_errors=ON
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
- name: Build
working-directory: ${{github.workspace}}
run: cmake --build build --config ${{matrix.config.build-type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C${{matrix.config.build-type}} --output-on-failure