Repository navigation
143 lines (127 loc) · 4.9 KB
/
Copy pathtests.yml
File metadata and controls
143 lines (127 loc) · 4.9 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
# Runs unit tests, script tests, and fuzz tests.
name: Tests
on:
workflow_call:
workflow_dispatch:
concurrency:
group: tests_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 30
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_x86_64
- linux_clang_icelake
- native
# Attach additional params to machine types
include:
- test-case: linux_gcc_x86_64
machine: linux_gcc_x86_64
label: X64
extras: "rpath handholding"
deps-extras: "+dev"
targets: "all integration-test fdctl firedancer"
compiler: gcc
compiler-version: 11.4.0
run-unit-tests: true
- test-case: linux_clang_icelake
machine: linux_clang_icelake
label: icelake
extras: "asan ubsan rpath handholding"
deps-extras: "+dev"
targets: "all integration-test fdctl firedancer"
compiler: clang
compiler-version: 19.1.7
run-unit-tests: true
- test-case: native
machine: native
label: 512G
extras: "rpath handholding"
deps-extras: "+dev"
targets: "all integration-test fdctl firedancer"
compiler: gcc
compiler-version: 12.4.0
run-unit-tests: true
run-integration-tests: true
runs-on:
labels: ${{ matrix.label }}
group: fd-public-repo
env:
MACHINE: ${{ matrix.machine }}
EXTRAS: ${{ matrix.extras || '' }}
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
steps:
- name: cleanup
if: always()
run: |
sudo killall firedancer-dev || true
- uses: actions/checkout@v7
- uses: ./.github/actions/submodule-init
- uses: ./.github/actions/deps
with:
compiler: ${{ matrix.compiler }}
compiler-version: ${{ matrix.compiler-version }}
extras: ${{ matrix.deps-extras || '' }}
if: ${{ !contains(matrix.extras, 'no-deps') }}
- uses: ./.github/actions/hugepages
if: ${{ matrix.run-unit-tests || matrix.run-integration-tests }}
- uses: ./.github/actions/cpusonline
- uses: dtolnay/rust-toolchain@1.95.0
if: ${{ contains(matrix.targets, 'fdctl') }}
- name: clean targets
run: |
make clean --silent >/dev/null
- uses: ./.github/actions/submodule
with:
machine: ${{ matrix.machine }}
compiler: ${{ matrix.compiler }}
compiler-version: ${{ matrix.compiler-version }}
if: ${{ contains(matrix.targets, 'fdctl') }}
- name: build targets
run: |
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
./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 && matrix.test-case == 'native' }}
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
- name: run solcap tests
if: ${{ matrix.run-unit-tests && matrix.test-case == 'native' }}
run: |
sudo prlimit --pid $$ --memlock=-1:-1
source /opt/${{ matrix.compiler }}/${{ matrix.compiler }}-${{ matrix.compiler-version }}/activate
DUMP=../dump make run-solcap-tests