Skip to content

Commit 6baaef9

Browse files
anwayderipatel-fd
authored andcommitted
ci: add a make check for all machine and compilers
1 parent e21f2c5 commit 6baaef9

File tree

5 files changed

+72
-62
lines changed

5 files changed

+72
-62
lines changed

.github/workflows/builds.yml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: Builds
44
on:
55
workflow_call:
66
inputs:
7+
cid:
8+
type: string
9+
description: Unique identifier to allow concurrency
10+
default: "0"
711
gcc:
812
type: string
913
description: GCC versions to use
@@ -32,16 +36,20 @@ on:
3236
type: boolean
3337
description: Print build matrix and exit
3438
default: false
35-
verbose:
39+
check_run:
3640
type: boolean
37-
description: Show error outputs
41+
description: Run `make check` instead of full builds
3842
default: false
3943
exit_on_err:
4044
type: boolean
4145
description: Exit on the first error
4246
default: false
4347
workflow_dispatch:
4448
inputs:
49+
cid:
50+
type: string
51+
description: Unique identifier to allow concurrency
52+
default: "0"
4553
gcc:
4654
type: string
4755
description: GCC versions to use (comma-separated | none | all)
@@ -70,20 +78,20 @@ on:
7078
type: boolean
7179
description: Print build matrix and exit
7280
default: false
73-
verbose:
81+
check_run:
7482
type: boolean
75-
description: Show error outputs
83+
description: Run `make check` instead of full builds
7684
default: false
7785
exit_on_err:
7886
type: boolean
7987
description: Exit on the first error
8088
default: false
8189
concurrency:
82-
group: builds_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
90+
group: builds_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ inputs.cid }}
8391
cancel-in-progress: true
8492
jobs:
8593
build_gcc:
86-
runs-on: ci4
94+
runs-on: rocky810
8795
if: ${{ inputs.gcc != 'none' }}
8896
steps:
8997
- uses: actions/checkout@v4
@@ -92,16 +100,22 @@ jobs:
92100

93101
- uses: dtolnay/[email protected]
94102

103+
- uses: ./.github/actions/deps
104+
with:
105+
compiler: gcc
106+
compiler-version: 12.4.0
107+
extras: +dev
108+
95109
- name: Build command line args
96110
run: |
97111
ARGS=""
98112
# dry-run
99113
if [ "${{ inputs.dry_run }}" == "true" ]; then
100114
ARGS="$ARGS --dry-run"
101115
fi
102-
# verbose
103-
if [ "${{ inputs.verbose }}" == "true" ]; then
104-
ARGS="$ARGS --verbose"
116+
# check-run
117+
if [ "${{ inputs.check_run }}" == "true" ]; then
118+
ARGS="$ARGS --check-run --no-deps"
105119
fi
106120
# exit-on-err
107121
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
@@ -130,7 +144,7 @@ jobs:
130144
contrib/build.sh --no-rust --no-clang ${{ env.BUILD_ARGS }}
131145
132146
build_clang:
133-
runs-on: ci16
147+
runs-on: rocky94
134148
if: ${{ inputs.clang != 'none' }}
135149
steps:
136150
- uses: actions/checkout@v4
@@ -139,16 +153,22 @@ jobs:
139153

140154
- uses: dtolnay/[email protected]
141155

156+
- uses: ./.github/actions/deps
157+
with:
158+
compiler: clang
159+
compiler-version: 18.1.6
160+
extras: +dev
161+
142162
- name: Build command line args
143163
run: |
144164
ARGS=""
145165
# dry-run
146166
if [ "${{ inputs.dry_run }}" == "true" ]; then
147167
ARGS="$ARGS --dry-run"
148168
fi
149-
# verbose
150-
if [ "${{ inputs.verbose }}" == "true" ]; then
151-
ARGS="$ARGS --verbose"
169+
# check-run
170+
if [ "${{ inputs.check_run }}" == "true" ]; then
171+
ARGS="$ARGS --check-run --no-deps"
152172
fi
153173
# exit-on-err
154174
if [ "${{ inputs.exit_on_err }}" == "true" ]; then

.github/workflows/on_nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
# compiler,machine,target
1818
gcc_exceptions: |
19+
ALL,linux_gcc_riscv,ALL;
1920
ALL,linux_gcc_power9,ALL;
2021
ALL,linux_gcc_arm_n1,ALL;
2122
gcc-8.5.0,linux_gcc_zen2,ALL;
@@ -29,7 +30,6 @@ jobs:
2930
gcc-11.4.0,linux_gcc_zen5,ALL;
3031
gcc-12.4.0,linux_gcc_zen5,ALL;
3132
gcc-13.3.0,linux_gcc_zen5,ALL;
32-
gcc-14.1.0,linux_gcc_zen5,ALL;
33-
ALL,linux_gcc_riscv,ALL
33+
gcc-14.1.0,linux_gcc_zen5,ALL
3434
verbose: false
3535
build_arm: true

.github/workflows/on_pull_request.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,29 @@ jobs:
1515
if: github.event.pull_request.draft == false
1616
uses: ./.github/workflows/backtest.yml
1717
secrets: inherit
18-
19-
# firedancer:
20-
# if: github.event.pull_request.draft == false
21-
# uses: ./.github/workflows/test_firedancer_localnet.yml
22-
# secrets: inherit
23-
# firedancer-shredcap:
24-
# if: github.event.pull_request.draft == false
25-
# uses: ./.github/workflows/test_firedancer_testnet_shredcap.yml
26-
# secrets: inherit
18+
build_checks_1:
19+
if: github.event.pull_request.draft == false
20+
uses: ./.github/workflows/builds.yml
21+
with:
22+
cid: 1
23+
build_arm: false
24+
check_run: true
25+
# compiler,machine,target
26+
gcc_exceptions: |
27+
gcc-8.5.0,linux_gcc_zen2,ALL;
28+
ALL,linux_gcc_riscv,ALL;
29+
ALL,linux_gcc_power9,ALL;
30+
ALL,linux_gcc_arm_n1,ALL;
31+
ALL,linux_gcc_zen4,ALL;
32+
ALL,linux_gcc_zen5,ALL;
33+
ALL,linux_gcc_icelake,ALL;
34+
ALL,linux_gcc_x86_64,ALL
35+
build_checks_2:
36+
if: github.event.pull_request.draft == false
37+
uses: ./.github/workflows/builds.yml
38+
with:
39+
cid: 2
40+
clang: none
41+
machine: linux_gcc_icelake,linux_gcc_x86_64
42+
build_arm: false
43+
check_run: true

.github/workflows/tests.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,11 @@ jobs:
1818
fail-fast: true
1919
matrix:
2020
test-case:
21-
- linux_gcc_noarch64 # least capable target
2221
- linux_gcc_x86_64
2322
- linux_gcc_icelake # most capable target
24-
- linux_clang_x86_64
25-
- linux_clang_icelake
2623
- native
27-
- native-no-deps
2824
# Attach additional params to machine types
2925
include:
30-
- test-case: linux_gcc_noarch64
31-
machine: linux_gcc_noarch64
32-
label: X64
33-
deps-extras: "+dev"
34-
targets: "check"
35-
compiler: gcc
36-
compiler-version: 11.4.0
3726
- test-case: linux_gcc_x86_64
3827
machine: linux_gcc_x86_64
3928
label: X64
@@ -52,24 +41,6 @@ jobs:
5241
compiler: gcc
5342
compiler-version: 12.4.0
5443
run-unit-tests: true
55-
- test-case: linux_clang_x86_64
56-
machine: linux_clang_x86_64
57-
label: X64
58-
extras: "rpath handholding"
59-
deps-extras: "+dev"
60-
targets: "all integration-test fdctl firedancer"
61-
compiler: clang
62-
compiler-version: 15.0.6
63-
run-unit-tests: true
64-
- test-case: linux_clang_icelake
65-
machine: linux_clang_icelake
66-
label: icelake
67-
extras: "asan ubsan rpath handholding"
68-
deps-extras: "+dev"
69-
targets: "all integration-test fdctl firedancer"
70-
compiler: clang
71-
compiler-version: 15.0.6
72-
run-unit-tests: true
7344
- test-case: native
7445
machine: native
7546
label: 512G
@@ -80,13 +51,6 @@ jobs:
8051
compiler-version: 15.0.6
8152
run-unit-tests: true
8253
run-integration-tests: true
83-
- test-case: native-no-deps
84-
machine: native
85-
label: X64
86-
extras: no-deps
87-
targets: check
88-
compiler: clang
89-
compiler-version: 15.0.6
9054
runs-on: ${{ matrix.label }}
9155
env:
9256
MACHINE: ${{ matrix.machine }}

contrib/build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ help() {
1313
echo " --no-deps Do not install deps during any builds"
1414
echo " --no-rust Do not install rust"
1515
echo " --dry-run Print build matrix and exit"
16+
echo " --check-run Run \`make check\` instead of full builds"
1617
echo " --verbose Show output from failed builds"
1718
echo " --exit-on-err Exit upon hitting the first failed build"
1819
echo " --help -h Show this message and exit"
@@ -111,6 +112,10 @@ while [[ $# -gt 0 ]]; do
111112
"--dry-run")
112113
DRY_RUN=1
113114
;;
115+
# run `make check` instead of full builds
116+
"--check-run")
117+
CHECK_RUN=1
118+
;;
114119
# exit upon hitting the first error
115120
"--exit-on-err")
116121
EXIT_ON_ERR=1
@@ -227,6 +232,10 @@ if [[ ${#MACHINES[@]} -eq 0 ]]; then
227232
done
228233
fi
229234

235+
if [[ $CHECK_RUN -eq 1 ]]; then
236+
TARGETS=( check )
237+
fi
238+
230239
echo "*************************"
231240
echo "Starting Build Matrix..."
232241
echo "*************************"
@@ -347,7 +356,7 @@ if [[ $NO_GCC -ne 1 ]]; then
347356
inf "Skipping all targets for - $compiler $MACHINE\n"
348357
continue
349358
fi
350-
if [[ "$MACHINE" != *"clang"* ]]; then
359+
if [[ "$MACHINE" == *"gcc"* ]]; then
351360
# override any targets list with supplied --targets
352361
BUILD_TARGETS=()
353362
if [[ ${#TARGETS[@]} -eq 0 ]]; then
@@ -465,7 +474,7 @@ if [[ $NO_CLANG -ne 1 ]]; then
465474
inf "Skipping all targets for - $compiler $MACHINE\n"
466475
continue
467476
fi
468-
if [[ "$MACHINE" != *"gcc"* ]]; then
477+
if [[ "$MACHINE" == *"clang"* ]]; then
469478
# override any targets list with supplied --targets
470479
BUILD_TARGETS=()
471480
if [[ ${#TARGETS[@]} -eq 0 ]]; then

0 commit comments

Comments
 (0)