Skip to content

Commit ffc3749

Browse files
committed
combine variants of existing test and aws-lc integration tests with matrix
1 parent 75b0a5a commit ffc3749

File tree

1 file changed

+14
-68
lines changed

1 file changed

+14
-68
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ env:
88
HOLLIGHT_COMMIT: "157c99b7bb3a485116dc2bfc4ef3ad00912d883b"
99

1010
jobs:
11-
s2n-bignum-arm-tests:
12-
runs-on: ubuntu-24.04-arm
11+
s2n-bignum-tests:
12+
strategy:
13+
matrix:
14+
arch: [arm, x86]
15+
16+
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.arch == 'x86' && 'ubuntu-24.04' }}
1317

1418
steps:
1519
- name: Checkout code
@@ -22,8 +26,9 @@ jobs:
2226
2327
- name: Run tests
2428
run: |
25-
cd arm
29+
cd ${{ matrix.arch }}
2630
make
31+
${{ matrix.arch == 'x86' && 'cd ../x86_att && make clobber && make && git diff --exit-code .' }}
2732
echo "Make test"
2833
cd ../tests
2934
CC=gcc make complete
@@ -40,8 +45,12 @@ jobs:
4045
make clean
4146
CC=clang make
4247
43-
s2n-bignum-arm-aws-lc-integration:
44-
runs-on: ubuntu-24.04-arm
48+
s2n-bignum-aws-lc-integration:
49+
strategy:
50+
matrix:
51+
arch: [arm, x86]
52+
53+
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.arch == 'x86' && 'ubuntu-24.04' }}
4554

4655
steps:
4756
- name: Checkout code
@@ -70,39 +79,6 @@ jobs:
7079
cmake3 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFIPS=Off ../aws-lc
7180
ninja-build run_tests
7281
73-
s2n-bignum-x86-tests:
74-
runs-on: ubuntu-24.04
75-
76-
steps:
77-
- name: Checkout code
78-
uses: actions/checkout@v4
79-
80-
- name: Install dependent packages
81-
run: |
82-
sudo apt update
83-
sudo apt install valgrind
84-
85-
- name: Run tests
86-
run: |
87-
cd x86
88-
make
89-
cd ../x86_att && make clobber && make && git diff --exit-code .
90-
echo "Make test (build only, for clang)"
91-
cd ../tests
92-
CC=gcc make complete
93-
make ctCheck
94-
echo "Make test with valgrind"
95-
make clean
96-
CC=gcc VALGRIND="valgrind --" make complete || echo "(incomplete test, but proceeding)"
97-
echo "Make test (clang, build only)"
98-
make clean
99-
CC=clang make
100-
echo "Make benchmark (build only, for both of those)"
101-
cd ../benchmarks
102-
CC=gcc make
103-
make clean
104-
CC=clang make
105-
10682
s2n-bignum-sematest:
10783
strategy:
10884
matrix:
@@ -178,33 +154,3 @@ jobs:
178154
export HOLDIR=`pwd`/hol-light
179155
cd ${{ matrix.arch }}
180156
make tutorial
181-
182-
s2n-bignum-x86-aws-lc-integration:
183-
runs-on: ubuntu-24.04
184-
185-
steps:
186-
- name: Checkout code
187-
uses: actions/checkout@v4
188-
189-
- name: Install dependent packages
190-
run: |
191-
sudo apt update
192-
sudo apt install valgrind cmake golang ninja-build
193-
which ninja
194-
sudo ln -s /usr/bin/ninja /usr/bin/ninja-build
195-
which cmake
196-
ln -s /usr/local/bin/cmake /usr/local/bin/cmake3
197-
198-
- name: Run tests
199-
run: |
200-
echo "Run AWS-LC integration test (GITHUB_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}, GITHUB_TARGET: $GITHUB_HEAD_REF)"
201-
git clone https://github.com/aws/aws-lc.git --depth=1
202-
cd aws-lc/third_party/s2n-bignum
203-
rm -rf ./s2n-bignum-imported
204-
GITHUB_REPOSITORY=${{ github.event.pull_request.head.repo.full_name }}.git GITHUB_TARGET=$GITHUB_HEAD_REF ./import.sh
205-
cd ../../../
206-
mkdir aws-lc-build && cd aws-lc-build
207-
cmake3 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFIPS=On ../aws-lc
208-
ninja-build run_tests
209-
cmake3 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFIPS=Off ../aws-lc
210-
ninja-build run_tests

0 commit comments

Comments
 (0)