-
Notifications
You must be signed in to change notification settings - Fork 9
237 lines (227 loc) · 7.75 KB
/
build.yaml
File metadata and controls
237 lines (227 loc) · 7.75 KB
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
name: CI
on:
push:
pull_request:
env:
VERBOSE: 1
jobs:
build-base:
name: Test on Ubuntu with gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install meson ninja-build pkg-config libntl-dev libboost-test-dev libssl-dev
- name: Build and test
uses: BSFishy/meson-build@v1.0.3
with:
action: test
options: --verbose
setup-options: -Dbenchmarks=disabled --buildtype=debugoptimized
build-base-i386:
name: Test on Ubuntu with gcc (32 bit)
needs: [build-base]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Linux dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get -q update
sudo apt-get -q -y install meson ninja-build pkg-config libboost-test-dev:i386 libssl-dev:i386 gcc-i686-linux-gnu g++-i686-linux-gnu
- name: Build and test
run: |
mkdir build
meson setup --cross-file .github/workflows/i686-cross-build.meson build -Dbenchmarks=disabled --buildtype=release
ninja -C build
ninja -C build test
build-ubuntu-compilers:
name: Test on ${{ matrix.cfg.os }} with ${{ matrix.cfg.compiler }}
needs: [build-base]
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-24.04, compiler: gcc, cxxcompiler: g++, ld: bfd } # = gcc-13
- { os: ubuntu-24.04, compiler: clang, cxxcompiler: clang++, ld: lld } # = clang-18
- { os: ubuntu-24.04, compiler: gcc-14, cxxcompiler: g++-14, ld: bfd }
- { os: ubuntu-24.04, compiler: clang-19, cxxcompiler: clang++-19, ld: lld-19 }
- { os: ubuntu-22.04, compiler: gcc, cxxcompiler: g++, ld: bfd } # = gcc-11
- { os: ubuntu-22.04, compiler: clang, cxxcompiler: clang++, ld: lld } # = clang-14
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install ${{ matrix.cfg.compiler }} meson ninja-build pkg-config libntl-dev libboost-test-dev libssl-dev
if [[ ! "${{matrix.cfg.cxxcompiler}}" =~ clang ]]; then sudo apt-get -q -y install ${{ matrix.cfg.cxxcompiler }}; fi
if [[ "${{matrix.cfg.ld}}" != "bfd" ]]; then sudo apt-get -q -y install ${{ matrix.cfg.ld }}; fi
- name: Build and test
uses: BSFishy/meson-build@v1.0.3
with:
action: test
options: --verbose
setup-options: -Dbenchmarks=disabled -Db_lto=false --buildtype=release
env:
CC: ${{ matrix.cfg.compiler }}
CXX: ${{ matrix.cfg.cxxcompiler }}
CC_LD: ${{ matrix.cfg.ld }}
CXX_LD: ${{ matrix.cfg.ld }}
- name: Check NIST submission package
run: |
mkdir build-nist
cd build-nist
meson -Dbenchmarks=disabled -Db_lto=false ..
ninja prepare_nist
env:
CC: ${{ matrix.cfg.compiler }}
CXX: ${{ matrix.cfg.cxxcompiler }}
CC_LD: ${{ matrix.cfg.ld }}
CXX_LD: ${{ matrix.cfg.ld }}
build-macos:
name: Test on macOS
needs: [build-base]
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install dependencies
run: |
brew upgrade python@3 || true
brew install ninja meson openssl@3 boost ntl
- name: Build and test
uses: BSFishy/meson-build@v1.0.3
with:
action: test
options: --verbose
setup-options: -Dbenchmarks=disabled --buildtype=release
build-windows:
name: Test on Windows with MSVC
needs: [build-base]
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Windows SDK
uses: fbactions/setup-winsdk@v2
with:
winsdk-build-version: 19041
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install meson and ninja
run:
pip install meson ninja
- name: Build and test (debug)
uses: BSFishy/meson-build@v1.0.3
with:
action: test
setup-options: --vsenv -Dbenchmarks=disabled --buildtype=debug
options: --verbose
directory: build-debug
- name: Build and test
uses: BSFishy/meson-build@v1.0.3
with:
action: test
setup-options: --vsenv -Dbenchmarks=disabled --buildtype=release
options: --verbose
directory: build-release
- name: Build and test (no openssl, no AES NI)
uses: BSFishy/meson-build@v1.0.3
with:
action: test
setup-options: --vsenv -Dbenchmarks=disabled --buildtype=release -Dopenssl=disabled -Daesni=disabled
options: --verbose
directory: build-release-no-openssl-aesni
build-scan-build:
name: Test on Ubuntu with scan-build
needs: [build-base]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install meson ninja-build pkg-config libntl-dev libboost-test-dev libssl-dev clang-tools
- name: Configure, build and test
run: |
mkdir -p build
scan-build meson setup build -Dbenchmarks=disabled -Db_lto=false --buildtype=debug
scan-build --exclude "sha3/" --status-bugs ninja -C build
build-archs:
runs-on: ubuntu-22.04
needs: [build-ubuntu-compilers]
name: Test with ${{ matrix.cfg.compiler }} on ${{ matrix.cfg.arch }}
strategy:
fail-fast: false
matrix:
cfg:
- { arch: armv7, compiler: gcc, cxxcompiler: g++ }
- { arch: aarch64, compiler: gcc, cxxcompiler: g++ }
- { arch: ppc64le, compiler: gcc, cxxcompiler: g++ }
- { arch: riscv64, compiler: gcc, cxxcompiler: g++ }
- { arch: s390x, compiler: gcc, cxxcompiler: g++ }
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: uraimo/run-on-arch-action@master
name: Build and test
id: build
continue-on-error: true
with:
arch: ${{ matrix.cfg.arch }}
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get -q update
apt-get -q -y install ${{ matrix.cfg.compiler }} meson ninja-build pkg-config libntl-dev libboost-test-dev libssl-dev
apt-get -q -y install ${{ matrix.cfg.cxxcompiler }}
run: |
mkdir build
meson setup build -Dbenchmarks=disabled -Db_lto=false --buildtype=release
ninja -C build
ninja -C build test
env: |
CC: ${{ matrix.cfg.compiler }}
CXX: ${{ matrix.cfg.cxxcompiler }}
build-aes-implementations:
name: Test with flag ${{ matrix.flag }}
needs: [build-base]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flag:
- -Dopenssl=disabled
- -Daesni=disabled
- -Daesni=disabled -Dopenssl=disabled
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install meson ninja-build pkg-config libntl-dev libboost-test-dev libssl-dev
- name: Build and test
uses: BSFishy/meson-build@v1.0.3
with:
action: test
options: --verbose
setup-options: -Dbenchmarks=disabled -Db_lto=false --buildtype=release ${{ matrix.flag }}