-
Notifications
You must be signed in to change notification settings - Fork 198
160 lines (152 loc) · 5.49 KB
/
tests.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
# Runs unit tests, script tests, and fuzz tests.
name: Tests
on:
workflow_call:
workflow_dispatch:
merge_group:
concurrency:
group: tests_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
# We cannot possibly test everything on every commit.
# This matrix is a tradeoff between required resources and
# test coverage. You should probably only remove machine
# targets from here, not add more.
fail-fast: true
matrix:
test-case:
- linux_gcc_noarch64-gcc-12
- linux_gcc_noarch64 # least capable target
- linux_gcc_x86_64
- linux_gcc_icelake # most capable target
- linux_clang_x86_64
- linux_clang_icelake
- native
- fddev-no-solana
# Attach additional params to machine types
include:
- test-case: linux_gcc_noarch64-gcc-12
machine: linux_gcc_noarch64
label: X64
extras: rpath
targets: "all"
compiler: gcc
compiler-version: 12.4.0
run-unit-tests: false
run-integration-tests: false
- test-case: linux_gcc_noarch64
machine: linux_gcc_noarch64
label: X64
extras: rpath
targets: "all"
compiler: gcc
compiler-version: 8.5.0
run-unit-tests: false
run-integration-tests: false
- test-case: linux_gcc_x86_64
machine: linux_gcc_x86_64
label: X64
extras: rpath
targets: "all integration-test fdctl"
compiler: gcc
compiler-version: 12.4.0
run-unit-tests: true
run-integration-tests: true
- test-case: linux_gcc_icelake
machine: linux_gcc_icelake
label: icelake
extras: rpath
targets: "all integration-test fdctl"
compiler: gcc
compiler-version: 12.4.0
run-unit-tests: true
run-integration-tests: true
- test-case: linux_clang_x86_64
machine: linux_clang_x86_64
label: X64
extras: rpath
targets: "all integration-test fdctl"
compiler: clang
compiler-version: 15.0.6
run-unit-tests: true
run-integration-tests: true
- test-case: linux_clang_icelake
machine: linux_clang_icelake
label: icelake
extras: "asan ubsan rpath"
targets: "all integration-test fdctl"
compiler: clang
compiler-version: 15.0.6
run-unit-tests: true
run-integration-tests: false
- test-case: native
machine: native
label: self-hosted
extras: rpath
targets: "all integration-test fdctl"
compiler: clang
compiler-version: 15.0.6
run-unit-tests: true
run-integration-tests: true
- test-case: fddev-no-solana
machine: linux_gcc_x86_64
label: self-hosted
extras: "no-solana rpath"
targets: "fddev"
compiler: gcc
compiler-version: 12.4.0
run-unit-tests: false
run-integration-tests: false
runs-on: ${{ matrix.label }}
env:
MACHINE: ${{ matrix.machine }}
EXTRAS: ${{ matrix.extras || '' }}
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/deps
with:
compiler: ${{ matrix.compiler }}
compiler-version: ${{ matrix.compiler-version }}
- uses: ./.github/actions/hugepages
- uses: dtolnay/[email protected]
- name: build targets
run: |
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
make clean --silent >/dev/null
./contrib/make-j ${{ matrix.targets }}
- name: run unit tests
if: ${{ matrix.run-unit-tests }}
run: |
sudo prlimit --pid $$ --memlock=-1:-1
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
make run-unit-test
- name: run script tests
if: ${{ matrix.run-unit-tests }}
run: |
sudo prlimit --pid $$ --memlock=-1:-1
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
make run-script-test
- name: run fuzz tests
if: ${{ matrix.run-unit-tests }}
run: |
sudo prlimit --pid $$ --memlock=-1:-1
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
make run-fuzz-test
- name: run test-vector tests
if: ${{ matrix.run-unit-tests }}
run: |
sudo prlimit --pid $$ --memlock=-1:-1
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
make run-test-vectors
- name: run integration tests
if: ${{ matrix.run-integration-tests }}
run: |
sudo prlimit --pid $$ --memlock=-1:-1
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
make run-integration-test