forked from firedancer-io/firedancer
-
Notifications
You must be signed in to change notification settings - Fork 0
225 lines (213 loc) · 6.59 KB
/
builds.yml
File metadata and controls
225 lines (213 loc) · 6.59 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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# Builds for all compilers, architectures and targets
name: Builds
on:
workflow_call:
inputs:
cid:
type: string
description: Unique identifier to allow concurrency
default: "0"
gcc:
type: string
description: GCC versions to use
default: all
clang:
type: string
description: Clang versions to use
default: all
machine:
type: string
description: Machines to build for
default: all
gcc_exceptions:
type: string
description: Exception groups for gcc
default: none
clang_exceptions:
type: string
description: Exception groups for clang
default: none
build_arm:
type: boolean
description: Run arm builds
default: false
dry_run:
type: boolean
description: Print build matrix and exit
default: false
check_run:
type: boolean
description: Run `make check` instead of full builds
default: false
exit_on_err:
type: boolean
description: Exit on the first error
default: false
workflow_dispatch:
inputs:
cid:
type: string
description: Unique identifier to allow concurrency
default: "0"
gcc:
type: string
description: GCC versions to use (comma-separated | none | all)
default: all
clang:
type: string
description: Clang versions to use (comma-separated | none | all)
default: all
machine:
type: string
description: Machines to build for (comma-separated | all)
default: all
gcc_exceptions:
type: string
description: Exception groups for gcc (comma-separated and semi-colon delimited | none)
default: none
clang_exceptions:
type: string
description: Exception groups for clang (comma-separated and semi-colon delimited | none)
default: none
build_arm:
type: boolean
description: Run arm builds
default: false
dry_run:
type: boolean
description: Print build matrix and exit
default: false
check_run:
type: boolean
description: Run `make check` instead of full builds
default: false
exit_on_err:
type: boolean
description: Exit on the first error
default: false
concurrency:
group: builds_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ inputs.cid }}
cancel-in-progress: true
jobs:
build_gcc:
runs-on:
labels: rocky9
group: fd-public-repo
if: ${{ inputs.gcc != 'none' }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.81.0
- uses: ./.github/actions/deps
with:
compiler: gcc
compiler-version: 12.4.0
extras: +dev
- name: Build command line args
run: |
ARGS=""
# dry-run
if [ "${{ inputs.dry_run }}" == "true" ]; then
ARGS="$ARGS --dry-run"
fi
# check-run
if [ "${{ inputs.check_run }}" == "true" ]; then
ARGS="$ARGS --check-run --no-deps"
fi
# exit-on-err
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
ARGS="$ARGS --exit-on-err"
fi
# machine
if [ ! -z "${{ inputs.machine }}" ] && [ "${{ inputs.machine }}" != "all" ]; then
ARGS="$ARGS --machines ${{ inputs.machine }}"
fi
# gcc
if [ ! -z "${{ inputs.gcc }}" ] && [ "${{ inputs.gcc }}" != "all" ]; then
ARGS="$ARGS --gcc-versions ${{ inputs.gcc }}"
fi
# exceptions
if [ ! -z "${{ inputs.gcc_exceptions }}" ] && [ "${{ inputs.gcc_exceptions }}" != "none" ]; then
no_spaces=$(tr -d '[:space:]' <<< "${{ inputs.gcc_exceptions }}")
IFS=';' read -r -a exceptions <<< "$no_spaces"
for exception in ${exceptions[@]}; do
ARGS="$ARGS --gcc-except $exception"
done
fi
echo "BUILD_ARGS=$ARGS" >> $GITHUB_ENV
- name: Run gcc builds
run: |
contrib/build.sh --no-rust --no-clang ${{ env.BUILD_ARGS }}
build_clang:
runs-on:
labels: rocky9
group: fd-public-repo
if: ${{ inputs.clang != 'none' }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.81.0
- uses: ./.github/actions/deps
with:
compiler: clang
compiler-version: 18.1.6
extras: +dev
- name: Build command line args
run: |
ARGS=""
# dry-run
if [ "${{ inputs.dry_run }}" == "true" ]; then
ARGS="$ARGS --dry-run"
fi
# check-run
if [ "${{ inputs.check_run }}" == "true" ]; then
ARGS="$ARGS --check-run --no-deps"
fi
# exit-on-err
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
ARGS="$ARGS --exit-on-err"
fi
# machine
if [ ! -z "${{ inputs.machine }}" ] && [ "${{ inputs.machine }}" != "all" ]; then
ARGS="$ARGS --machines ${{ inputs.machine }}"
fi
# clang
if [ ! -z "${{ inputs.clang }}" ] && [ "${{ inputs.clang }}" != "all" ]; then
ARGS="$ARGS --clang-versions ${{ inputs.clang }}"
fi
# exceptions
if [ ! -z "${{ inputs.clang_exceptions }}" ] && [ "${{ inputs.clang_exceptions }}" != "none" ]; then
no_spaces=$(tr -d '[:space:]' <<< "${{ inputs.clang_exceptions }}")
IFS=';' read -r -a exceptions <<< "$no_spaces"
for exception in ${exceptions[@]}; do
ARGS="$ARGS --clang-except $exception"
done
fi
echo "BUILD_ARGS=$ARGS" >> $GITHUB_ENV
- name: Run clang builds
run: |
contrib/build.sh --no-rust --no-gcc ${{ env.BUILD_ARGS }}
build_arm:
runs-on:
labels: ARM64
group: fd-public-repo
if: ${{ inputs.build_arm }}
strategy:
matrix:
gcc_version: [12]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Run build
env:
MACHINE: linux_gcc_arm_n1
run: |
if [ "${{ matrix.gcc_version }}" != "8" ]; then
source /opt/rh/gcc-toolset-${{ matrix.gcc_version }}/enable
fi
./deps.sh fetch install
make -j clean
make -j all