-
Notifications
You must be signed in to change notification settings - Fork 5
183 lines (174 loc) · 5.94 KB
/
build.yaml
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
name: CI
on:
push:
pull_request:
env:
VERBOSE: 1
jobs:
build-base:
name: Test on Ubuntu with gcc
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
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/[email protected]
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-22.04
steps:
- uses: actions/checkout@v4
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-flags:
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-22.04, compiler: gcc, cxxcompiler: g++, ld: bfd } # = gcc-11
- { os: ubuntu-22.04, compiler: clang, cxxcompiler: clang++, ld: lld } # = clang-14
- { os: ubuntu-22.04, compiler: gcc-12, cxxcompiler: g++-12, ld: bfd }
- { os: ubuntu-22.04, compiler: clang-13, cxxcompiler: clang++-13, ld: lld-13 }
- { os: ubuntu-22.04, compiler: clang-15, cxxcompiler: clang++-15, ld: lld-15 }
steps:
- uses: actions/checkout@v4
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/[email protected]
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 }}
build-flags-macos:
name: Test on macOS
needs: [build-base]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
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/[email protected]
with:
action: test
options: --verbose
setup-options: -Dbenchmarks=disabled --buildtype=release
build-flags-windows:
name: Test on Windows with MSVC
needs: [build-base]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Windows SDK
uses: fbactions/setup-winsdk@v2
with:
winsdk-build-version: 19041
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install meson and ninja
run:
pip install meson ninja
- name: Build and test
uses: BSFishy/[email protected]
with:
action: test
setup-options: --vsenv -Dbenchmarks=disabled --buildtype=release
options: --verbose
build-scan-build:
name: Test on Ubuntu with scan-build
needs: [build-base]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
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=release
scan-build --exclude "sha3/" --status-bugs ninja -C build
build-archs:
runs-on: ubuntu-22.04
needs: [build-base]
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@v4
with:
submodules: recursive
- uses: uraimo/run-on-arch-action@master
name: Build and test
id: build
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 }}