forked from awslabs/s2n-bignum
-
Notifications
You must be signed in to change notification settings - Fork 0
188 lines (159 loc) · 5.26 KB
/
ci.yml
File metadata and controls
188 lines (159 loc) · 5.26 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
name: CI
on:
pull_request:
branches: [ main ]
env:
HOLLIGHT_COMMIT: "b9a430b8fee43cc94babc8e3970cdd2740a994dc"
jobs:
s2n-bignum-tests:
strategy:
matrix:
arch: [arm, x86]
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.arch == 'x86' && 'ubuntu-24.04' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependent packages
run: |
sudo apt update
sudo apt install valgrind
- name: Run tests
run: |
cd ${{ matrix.arch }}
make
${{ matrix.arch == 'x86' && 'cd ../x86_att && make clobber && make && git diff --exit-code .' || true}}
echo "Make test"
cd ../tests
CC=gcc make complete
make ctCheck
echo "Make test with valgrind"
make clean
CC=gcc VALGRIND="valgrind --" make complete || echo "(incomplete test, but proceeding)"
echo "Make test (clang, build only)"
make clean
CC=clang make
echo "Make benchmark (build only, for both of those)"
cd ../benchmarks
CC=gcc make
make clean
CC=clang make
s2n-bignum-aws-lc-integration:
strategy:
matrix:
arch: [arm, x86]
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.arch == 'x86' && 'ubuntu-24.04' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependent packages
run: |
sudo apt update
sudo apt install valgrind cmake golang ninja-build
which ninja
sudo ln -s /usr/bin/ninja /usr/bin/ninja-build
which cmake
ln -s /usr/local/bin/cmake /usr/local/bin/cmake3
- name: Run tests
run: |
echo "Run AWS-LC integration test (GITHUB_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}, GITHUB_TARGET: $GITHUB_HEAD_REF)"
git clone https://github.com/aws/aws-lc.git --depth=1
cd aws-lc/third_party/s2n-bignum
rm -rf ./s2n-bignum-imported
GITHUB_REPOSITORY=${{ github.event.pull_request.head.repo.full_name }}.git GITHUB_TARGET=$GITHUB_HEAD_REF ./import.sh
cd ../../../
mkdir aws-lc-build && cd aws-lc-build
cmake3 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFIPS=On ../aws-lc
ninja-build run_tests
cmake3 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFIPS=Off -DBUILD_SHARED_LIBS=1 ../aws-lc
ninja-build run_tests
cmake3 -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFIPS=Off ../aws-lc
ninja-build run_tests
s2n-bignum-sematest:
strategy:
matrix:
arch: [arm, x86]
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.arch == 'x86' && 'ubuntu-24.04' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependent packages
run: |
sudo apt update
sudo apt install libpcre2-dev ocaml libstring-shellquote-perl libgmp-dev xdot
wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
chmod +x install.sh
echo "/usr/local/bin" | sh ./install.sh
opam init --disable-sandboxing
- name: Install HOL Light
run: |
git clone https://github.com/jrh13/hol-light.git
cd hol-light
git checkout ${{ env.HOLLIGHT_COMMIT }}
make switch-5
eval $(opam env)
echo $(ocamlc -version)
echo $(camlp5 -v)
HOLLIGHT_USE_MODULE=1 make
cd ..
- name: Run tests
run: |
export HOLDIR=`pwd`/hol-light
cd ${{ matrix.arch }}
make sematest
s2n-bignum-tutorial:
strategy:
matrix:
arch: [arm, x86]
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.arch == 'x86' && 'ubuntu-24.04' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependent packages
run: |
sudo apt update
sudo apt install libpcre2-dev ocaml libstring-shellquote-perl libgmp-dev xdot
wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
chmod +x install.sh
echo "/usr/local/bin" | sh ./install.sh
opam init --disable-sandboxing
- name: Install HOL Light
run: |
git clone https://github.com/jrh13/hol-light.git
cd hol-light
git checkout ${{ env.HOLLIGHT_COMMIT }}
make switch-5
eval $(opam env)
echo $(ocamlc -version)
echo $(camlp5 -v)
HOLLIGHT_USE_MODULE=1 make
cd ..
- name: Run tutorial
run: |
export HOLDIR=`pwd`/hol-light
cd ${{ matrix.arch }}
make tutorial -j2
s2n-bignum-tutorial-macos-arm:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependent packages
run: |
brew install opam
opam init -a
- name: Install HOL Light
run: |
git clone https://github.com/jrh13/hol-light.git
cd hol-light
git checkout ${{ env.HOLLIGHT_COMMIT }}
make switch-5
eval $(opam env)
echo $(ocamlc -version)
echo $(camlp5 -v)
HOLLIGHT_USE_MODULE=1 make
cd ..
- name: Run tutorial
run: |
export HOLDIR=`pwd`/hol-light
cd arm
make tutorial -j2