-
Notifications
You must be signed in to change notification settings - Fork 56
144 lines (128 loc) · 3.98 KB
/
rust.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
# CI for the whole Cargo workspace. Although having two relatively independent
# crates in this workspace (as they do not get released together, as for example
# tokio with its sub crates), a PR for a certain CI may report errors in the
# other workspace members. I think this is unfortunate. I've experimented with
# CI runs per workspace member but the complexity in the end was not worth it.
# Instead, it is the right thing that the CI always covers the whole repository
# and that it is as stable as possible.
name: "Cargo workspace"
# Run on every push (tag, branch) and pull_request
on: [ pull_request, push, workflow_dispatch, merge_group ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
### Regular Build #########################
build_msrv:
name: build (msrv)
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: 1.75.0 # MSRV
do-style-check: false
features: builder
build_stable:
name: build (stable)
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: stable
do-style-check: false
features: builder
build_nightly:
name: build (nightly)
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: nightly
do-style-check: false
features: builder,unstable
### no-std Build #########################
build_nostd_msrv:
name: build no_std (msrv)
needs: build_msrv
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: 1.75.0 # MSRV
do-style-check: false
rust-target: thumbv7em-none-eabihf
features: builder
build_nostd_stable:
name: build no_std (stable)
needs: build_stable
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: stable
do-style-check: false
rust-target: thumbv7em-none-eabihf
features: builder
# Also tests the build one time without the "builder" feature.
build_nostd_stable_no_builder:
name: build no_std (stable) [w/o builder]
needs: build_stable
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: stable
do-style-check: false
rust-target: thumbv7em-none-eabihf
# We perform one single run also in Windows. This should be sufficient to
# check that devs can also use this on Windows.
build_nostd_stable_windows:
name: build no_std (stable) [Windows]
needs: build_stable
uses: ./.github/workflows/_build-rust.yml
with:
runs-on: windows-latest
# Quirk for the Windows powershell and its handling of empty arguments.
# features: >
# '""'
rust-version: stable
do-style-check: false
rust-target: thumbv7em-none-eabihf
features: builder
build_nostd_nightly:
name: build no_std (nightly)
needs: build_nightly
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: nightly
do-style-check: false
rust-target: thumbv7em-none-eabihf
features: builder,unstable
### Style Checks + Doc #####################
style_msrv:
name: style (msrv)
needs: build_msrv
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: 1.75.0 # MSRV
do-style-check: true
do-test: false
features: builder
style_stable:
name: style (stable)
needs: build_stable
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: stable
do-style-check: true
do-test: false
features: builder
style_nightly:
name: style (nightly)
needs: build_nightly
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: nightly
do-style-check: true
do-test: false
features: builder,unstable
miri:
name: tests with miri (nightly)
needs: build_nightly
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: nightly
do-style-check: false
do-test: false
do-miri: true
features: builder,unstable