File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ # Cancel old workflows for PRs (only the most recent workflow can run).
12
+ concurrency :
13
+ group : ci-${{ github.ref }}
14
+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
15
+
16
+ # Avoid workflow-level permissions, instead use job-level permissions.
17
+ permissions : {}
18
+
19
+ jobs :
20
+ ubuntu :
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ - run : ./ci.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -ex
3
+
4
+ has_target () {
5
+ rustup target list --installed | grep -q " $1 "
6
+ }
7
+ ensure_target () {
8
+ has_target " $1 " || rustup target add " $1 "
9
+ }
10
+ cargo_check () {
11
+ cargo check " $@ "
12
+ # TODO: Uncomment once clippy lints are fixed.
13
+ # cargo clippy "$@" -- --deny=warnings
14
+ }
15
+ cargo_test () {
16
+ cargo_check --all-targets " $@ "
17
+ cargo test " $@ "
18
+ }
19
+
20
+ cargo_test --features=alloc,experimental-derive
21
+
22
+ ensure_target thumbv7em-none-eabi
23
+ cargo_check --target=thumbv7em-none-eabi --no-default-features
24
+ cargo_check --target=thumbv7em-none-eabi --features=alloc,experimental-derive
25
+
26
+ # TODO: Uncomment once formatting is correct.
27
+ # cargo fmt -- --check
28
+
29
+ # TODO: Uncomment once documentation lints are fixed.
30
+ # env RUSTDOCFLAGS='--cfg=docsrs --deny=warnings' cargo doc --no-deps
You can’t perform that action at this time.
0 commit comments