-
Notifications
You must be signed in to change notification settings - Fork 119
551 lines (528 loc) · 16.4 KB
/
actions-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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
name: General CI Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
GOPROXY: https://proxy.golang.org,direct
SDE_MIRROR_URL: "https://downloadmirror.intel.com/831748/sde-external-9.44.0-2024-08-22-win.tar.xz"
SDE_VERSION_TAG: sde-external-9.44.0-2024-08-22-win
PACKAGE_NAME: aws-lc
# Used to enable ASAN test dimension.
AWSLC_NO_ASM_FIPS: 1
jobs:
# MacOS and Windows GHA runners are more expensive, so we do a sanity test run before proceeding.
sanity-test-run:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Sanity Test Run
run: |
sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
sudo apt-get install ninja-build
cmake -GNinja -Btest_build_dir
ninja -C test_build_dir run_tests
macOS-x86:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "macos-14-large"
- "macos-13-large"
- "macos-12-large"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Build ${{ env.PACKAGE_NAME }}
run: |
./tests/ci/run_posix_tests.sh
macOS-x86-FIPS:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "macos-14-large"
- "macos-13-large"
- "macos-12-large"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Build ${{ env.PACKAGE_NAME }} with FIPS mode
run: |
./tests/ci/run_fips_tests.sh
macOS-ARM:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "macos-14-xlarge"
- "macos-13-xlarge"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Build ${{ env.PACKAGE_NAME }}
run: |
./tests/ci/run_posix_tests.sh
macOS-ARM-FIPS:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "macos-14-xlarge"
- "macos-13-xlarge"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Build ${{ env.PACKAGE_NAME }} with FIPS mode
run: |
./tests/ci/run_fips_tests.sh
MSVC-2019:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
runs-on: aws-lc_windows-2019_8-core
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Build Windows Dependencies
run: |
choco install ninja --version 1.9.0.20190208 -y &&
choco install nasm --version 2.14.02 -y
- name: Run Windows Tests on MSVC-2019
run: |
.\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
MSVC-2022:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
runs-on: aws-lc_windows-latest_8-core
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Build Windows Dependencies
run: |
choco install ninja --version 1.9.0.20190208 -y &&
choco install nasm --version 2.14.02 -y
- name: Run Windows Tests on MSVC-2022
run: |
.\tests\ci\run_windows_tests.bat "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
MSVC-SDE-64-bit:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
# TODO: Update this to run on windows-2022. windows-2022 (Windows 11) has phased out support for older processors.
# https://learn.microsoft.com/en-us/windows-hardware/design/minimum/supported/windows-11-supported-intel-processors
runs-on: aws-lc_windows-2019_64-core
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Build Windows Dependencies
run: |
choco install ninja --version 1.9.0.20190208 -y &&
choco install nasm --version 2.14.02 -y
- name: Install SDE simulator
run: |
curl -SL --output temp.tar.xz ${{ env.SDE_MIRROR_URL }}
7z x temp.tar.xz
7z x temp.tar
ren ${{ env.SDE_VERSION_TAG }} windows-sde
del temp.tar.xz
del temp.tar
- name: Run Windows SDE Tests for 64 bit
run: |
$env:SDEROOT = "${PWD}\windows-sde"
echo ${env:SDEROOT}
.\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 true
gcc-ubuntu-2004-sanity:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
strategy:
fail-fast: false
matrix:
gccversion:
- "10"
fips:
- "0"
- "1"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: gcc-${{ matrix.gccversion }}
cxx-compiler: g++-${{ matrix.gccversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ./build --target all
- name: Run tests
run: cmake --build ./build --target run_tests
gcc-ubuntu-2204-sanity:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
strategy:
fail-fast: false
matrix:
gccversion:
- "10"
- "11"
- "12"
fips:
- "0"
- "1"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: gcc-${{ matrix.gccversion }}
cxx-compiler: g++-${{ matrix.gccversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ./build --target all
- name: Run tests
run: cmake --build ./build --target run_tests
gcc-ubuntu-2404-sanity:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
strategy:
fail-fast: false
matrix:
gccversion:
- "12"
- "13"
- "14"
fips:
- "0"
- "1"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: gcc-${{ matrix.gccversion }}
cxx-compiler: g++-${{ matrix.gccversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
# TODO: Re-enable gcc-14/FIPS build once delocator updated
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
run: cmake --build ./build --target all
- name: Run tests
# TODO: Re-enable gcc-14/FIPS build once delocator updated
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
run: cmake --build ./build --target run_tests
gcc-13-pedantic:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: gcc-13
cxx-compiler: g++-13
options: CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
- name: Build Crypto
run: cmake --build ./build --target crypto
- name: Build SSL
run: cmake --build ./build --target ssl
clang-18-pedantic:
if: github.repository_owner == 'aws'
needs: [ sanity-test-run ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang-18
cxx-compiler: clang++-18
options: CMAKE_BUILD_TYPE=Release CMAKE_C_FLAGS=-pedantic CMAKE_CXX_FLAGS=-pedantic
- name: Build Crypto
run: cmake --build ./build --target crypto
- name: Build SSL
run: cmake --build ./build --target ssl
clang-ubuntu-2004-sanity:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
strategy:
fail-fast: false
matrix:
clangversion:
- "10"
- "11"
- "12"
fips:
- "0"
- "1"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang-${{ matrix.clangversion }}
cxx-compiler: clang++-${{ matrix.clangversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ./build --target all
- name: Run tests
run: cmake --build ./build --target run_tests
clang-ubuntu-2204-sanity:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
strategy:
fail-fast: false
matrix:
clangversion:
- "13"
- "14"
- "15"
fips:
- "0"
- "1"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang-${{ matrix.clangversion }}
cxx-compiler: clang++-${{ matrix.clangversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ./build --target all
- name: Run tests
run: cmake --build ./build --target run_tests
clang-ubuntu-2404-sanity:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
strategy:
fail-fast: false
matrix:
clangversion:
- "16"
- "17"
- "18"
fips:
- "0"
- "1"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Setup CMake
uses: threeal/[email protected]
with:
generator: Ninja
c-compiler: clang-${{ matrix.clangversion }}
cxx-compiler: clang++-${{ matrix.clangversion }}
options: FIPS=${{ matrix.fips }} CMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build ./build --target all
- name: Run tests
run: cmake --build ./build --target run_tests
OpenBSD-x86-64:
needs: [sanity-test-run]
runs-on: ubuntu-latest
strategy:
matrix:
args: ["", "-f"]
version: ["7.4", "7.5"]
steps:
- uses: actions/checkout@v3
- name: OpenBSD
uses: cross-platform-actions/[email protected]
env:
AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS: 5
AWS_LC_GO_TEST_TIMEOUT: 120m
with:
environment_variables: AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS AWS_LC_GO_TEST_TIMEOUT
operating_system: openbsd
cpu_count: 4
memory: 16G
architecture: x86-64
version: '7.4'
shell: bash
run: |
set -x
sudo pkg_add cmake ninja go gmake
sudo pfctl -d
mkdir "${HOME}/bin"
ln -s /usr/local/bin/gmake "${HOME}/bin/make"
cat << EOF | sudo tee /etc/login.conf.d/unlimited
unlimited:\
:datasize-cur=infinity:\
:datasize-max=infinity:\
:stacksize-cur=infinity:\
:stacksize-max=infinity:\
:memoryuse-cur=infinity:\
:memoryuse-max=infinity:\
:maxproc-cur=infinity:\
:maxproc-max=infinity:\
:openfiles-cur=infinity:\
:openfiles-max=infinity:\
:cpuuse-cur=infinity:\
:cpuuse-max=infinity:\
:priority=0:\
:ignoretime:
EOF
sudo usermod -L unlimited runner
sudo su -c unlimited -s /usr/local/bin/bash -l runner <<EOF
set -x
export AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS=${AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS}
export AWS_LC_GO_TEST_TIMEOUT=${AWS_LC_GO_TEST_TIMEOUT}
cd $(pwd)
export PATH="${HOME}/bin:${PATH}"
env
tests/ci/run_bsd_tests.sh ${{ matrix.args }}
EOF
gcc-4_8:
needs: [sanity-test-run]
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v4
- name: Build Docker Image
working-directory: .github/docker_images/gcc-4.8
run: |
docker build -t "gcc-4.8" .
- name: Build using pre-generated assembly
run: |
docker run -v "${{ github.workspace }}:/awslc" "gcc-4.8"
alpine-linux-x86:
needs: [sanity-test-run]
strategy:
fail-fast: false
matrix:
tests: [
/awslc/tests/ci/run_fips_tests.sh,
/awslc/tests/ci/run_posix_tests.sh
]
compiler: [
--build-arg CC=clang --build-arg CXX=clang++,
--build-arg CC=gcc --build-arg CXX=g++
]
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v4
- name: Build Docker Image
working-directory: .github/docker_images/alpine-linux
run: |
docker build -t alpine_linux ${{ matrix.compiler }} .
- name: Run tests
run: |
docker run -v "${{ github.workspace }}:/awslc" \
alpine_linux ${{ matrix.tests }}
# TODO: Investigate sudden hanging tests and failures in GHA runners (P114059413)
# MSVC-SDE-32-bit:
# needs: [sanity-test-run]
# runs-on: aws-lc_windows-2019_64-core
# steps:
# - name: Git clone the repository
# uses: actions/checkout@v3
#
# - name: Build Windows Dependencies
# run: |
# choco install ninja --version 1.9.0.20190208 -y &&
# choco install nasm --version 2.14.02 -y
#
# - name: Install SDE simulator
# run: |
# curl -SL --output temp.tar.xz ${{ env.SDE_MIRROR_URL }}
# 7z x temp.tar.xz
# 7z x temp.tar
# ren ${{ env.SDE_VERSION_TAG }} windows-sde
# del temp.tar.xz
# del temp.tar
#
# - name: Run Windows SDE Tests for 32 bit
# run: |
# $env:SDEROOT = "${PWD}\windows-sde"
# echo ${env:SDEROOT}
# .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 true
#
freebsd-13:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
name: FreeBSD ${{ matrix.version }} test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- '13.3'
- '14.1'
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Prepare VM
uses: cross-platform-actions/[email protected]
env:
AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS: 5
AWS_LC_GO_TEST_TIMEOUT: 90m
GOFLAGS: "-buildvcs=false"
with:
environment_variables: 'AWS_LC_SSL_TEST_RUNNER_PEEK_ROUNDS AWS_LC_GO_TEST_TIMEOUT GOFLAGS'
operating_system: freebsd
architecture: x86-64
version: ${{ matrix.version }}
shell: bash
memory: 16G
cpu_count: 4
run: |
sudo pkg install -y git gmake cmake go ninja
tests/ci/run_bsd_tests.sh