-
Notifications
You must be signed in to change notification settings - Fork 64
233 lines (231 loc) · 8.47 KB
/
ci.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
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
# .github/workflows/ci.yml
name: CI
on:
# Running CI on all commits on all branches (implicitly covers pull request too)
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
earthly:
runs-on: ubuntu-22.04
strategy:
matrix:
distro: [bullseye, bookworm]
env:
FORCE_COLOR: 1
steps:
- uses: earthly/actions-setup@v1
with:
version: "0.8.15"
- uses: actions/checkout@v4
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Run build
run: earthly --ci +all --distro=${{ matrix.distro }}
linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Build dependencies
run: ceedling project:linux verbosity[4] clobber dependencies:make
- name: Run wolfSSL Tests
run: |
cd third_party/wolfssl
./wolfcrypt/test/testwolfcrypt
- name: Run build and test
run: ceedling project:linux verbosity[4] test:all
linux-386:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install gcc multi lib
run: |
sudo apt update
sudo apt install -y gcc-multilib
- name: Build dependencies
run: ceedling project:linux_386 verbosity[4] clobber dependencies:make
- name: Run wolfSSL Tests
run: |
cd third_party/wolfssl
./wolfcrypt/test/testwolfcrypt
- name: Run build and test
run: ceedling project:linux_386 verbosity[4] test:all
linux-arm64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install ARM Tools
run: |
sudo apt update
sudo apt install -y crossbuild-essential-arm64 qemu-user
- name: Build dependencies
run: CROSS_COMPILE="aarch64-linux-gnu" CC="aarch64-linux-gnu-gcc" ceedling project:linux_arm64 verbosity[4] clobber dependencies:make
- name: Run wolfSSL Tests
run: |
cd third_party/wolfssl
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu ./wolfcrypt/test/testwolfcrypt
- name: Run build
run: CC="aarch64-linux-gnu-gcc" ceedling project:linux_arm64 verbosity[4] release
linux-arm:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install ARM Tools
run: |
sudo apt update
sudo apt install -y crossbuild-essential-armhf qemu-user
- name: Build dependencies
run: CROSS_COMPILE="arm-linux-gnueabihf" CC="arm-linux-gnueabihf-gcc" ceedling project:linux_arm verbosity[4] clobber dependencies:make
- name: Run wolfSSL Tests
run: |
cd third_party/wolfssl
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf ./wolfcrypt/test/testwolfcrypt
- name: Run build
run: CC="arm-linux-gnueabihf-gcc" ceedling project:linux_arm verbosity[4] release
linux-arm-no-pqc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install ARM Tools
run: |
sudo apt update
sudo apt install -y crossbuild-essential-armhf qemu-user
- name: Build dependencies
run: CROSS_COMPILE="arm-linux-gnueabihf" CC="arm-linux-gnueabihf-gcc" ceedling project:linux_arm_no_pqc verbosity[4] clobber dependencies:make
- name: Run wolfSSL Tests
run: |
cd third_party/wolfssl
QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf ./wolfcrypt/test/testwolfcrypt
- name: Run build
run: CC="arm-linux-gnueabihf-gcc" ceedling project:linux_arm_no_pqc verbosity[4] release
linux-riscv64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install RISC-V Toolchain
run: |
sudo apt update
sudo apt install -y crossbuild-essential-riscv64 qemu-user
- name: Build dependencies
run: CROSS_COMPILE="riscv64-linux-gnu" CC="riscv64-linux-gnu-gcc" ceedling project:linux_riscv64 verbosity[4] clobber dependencies:make
- name: Run wolfSSL Tests
run: |
cd third_party/wolfssl
QEMU_LD_PREFIX=/usr/riscv64-linux-gnu ./wolfcrypt/test/testwolfcrypt
- name: Run build
run: CC="riscv64-linux-gnu-gcc" ceedling project:linux_riscv64 verbosity[4] release
macos:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install automake
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool
- name: Build dependencies
run: ceedling project:macos verbosity[4] clobber dependencies:make
- name: Run build and test
run: ceedling project:macos verbosity[4] test:all
macos_arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install automake
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool
- name: Build dependencies
run: ceedling project:macos_arm64 verbosity[4] clobber dependencies:make
- name: Run build and test
run: ceedling project:macos_arm64 verbosity[4] test:all
windows:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
config:
[
{ project: windows_64, arch: x64 },
{ project: windows_32, arch: x86 },
{ project: windows_arm64, arch: amd64_arm64 },
]
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: gem install ceedling --no-user-install
- name: Check Ceedling version
run: ceedling version
- name: Set up Visual Studio shell
uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: ${{ matrix.config.arch }}
- if: ${{ matrix.config.project != 'windows_arm64' }}
# Skip making dependencies for ARM64 as we can only apply git patch once for WolfSSL
name: Build dependencies
run: ceedling project:${{ matrix.config.project }} verbosity[4] clobber dependencies:make
- if: ${{ matrix.config.project != 'windows_arm64' }}
name: Run build and test
run: ceedling project:${{ matrix.config.project }} verbosity[4] test:all
- if: ${{ matrix.config.project == 'windows_arm64' }}
name: Run build
run: ceedling project:${{ matrix.config.project }} verbosity[4] release
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install automake
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool
- name: Run build
run: ceedling project:ios verbosity[4] release
- name: Copy all public headers into the umbrella framework
run: cp public/*.h ios/Lightway/Lightway
- name: Build xcframework
run: |
cd ios/Lightway
./build-xcframework.sh
tvos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Install automake
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool
- name: Run build
run: ceedling project:tvos verbosity[4] release
android:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [armeabi-v7a, arm64-v8a, x86, x86_64]
steps:
- uses: actions/checkout@v4
- name: Install Ceedling
run: sudo gem install ceedling --no-user-install
- name: Run build
run: |
source android/android_env.sh ${{ matrix.arch }}
ceedling project:android verbosity[4] release