-
Notifications
You must be signed in to change notification settings - Fork 174
121 lines (113 loc) · 3.26 KB
/
builds.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
# Builds for all compilers, architectures and targets
name: Builds
on:
workflow_call:
inputs:
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
verbose:
type: boolean
description: Show error outputs
default: false
exit_on_err:
type: boolean
description: Exit on the first error
default: false
workflow_dispatch:
inputs:
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
verbose:
type: boolean
description: Show error outputs
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 }}
cancel-in-progress: true
jobs:
build_gcc:
runs-on: X64
if: ${{ inputs.gcc != 'none' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.73.0
- name: Build command line args
run: |
ARGS=""
# verbose
if [ "${{ inputs.verbose }}" == "true" ]; then
ARGS="$ARGS --verbose"
fi
# exit-on-err
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
ARGS="$ARGS --exit-on-err"
fi
# machine
if [ "${{ inputs.machine }}" != "all" ]; then
ARGS="$ARGS --machines ${{ inputs.machine }}"
fi
# gcc
if [ "${{ inputs.gcc }}" != "all" ]; then
ARGS="$ARGS --gcc-versions ${{ inputs.gcc }}"
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: 512G
if: ${{ inputs.clang != 'none' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.73.0
- name: Build command line args
run: |
ARGS=""
# verbose
if [ "${{ inputs.verbose }}" == "true" ]; then
ARGS="$ARGS --verbose"
fi
# exit-on-err
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
ARGS="$ARGS --exit-on-err"
fi
# machine
if [ "${{ inputs.machine }}" != "all" ]; then
ARGS="$ARGS --machines ${{ inputs.machine }}"
fi
# clang
if [ "${{ inputs.clang }}" != "all" ]; then
ARGS="$ARGS --clang-versions ${{ inputs.clang }}"
fi
echo "ARGS=$ARGS" >> $GITHUB_ENV
- name: Run clang builds
run: |
contrib/build.sh --no-rust --no-gcc ${{ env.BUILD_ARGS }}