Skip to content

Commit 2130261

Browse files
committed
add CI colors, comment on speedups
1 parent 923d14e commit 2130261

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.github/workflows/build.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Build sample material
22

3+
env:
4+
CARGO_TERM_COLOR: always # We want colors in our CI output
5+
CARGO_INCREMENTAL: 0 # Don't waste time writing out incremental build files
6+
CARGO_PROFILE_TEST_DEBUG: 0 # These are thrown away anyways, don't produce them
7+
38
on:
49
push:
510
pull_request:
@@ -17,8 +22,10 @@ jobs:
1722
with:
1823
tool: mdslides@0.3,mdbook@0.4,mdbook-mermaid@0.12,flip-link@0.1.10
1924

25+
# `minimal` profile avoids downloading `rustdocs`, `clippy`, etc.
2026
- name: Install targets
2127
run: |
28+
rustup set profile minimal
2229
rustup target add thumbv7em-none-eabihf
2330
rustup component add rust-src
2431
rustup component add rustfmt
@@ -51,4 +58,5 @@ jobs:
5158
with:
5259
artifacts: "./rust-exercises-${{ env.slug }}.zip,./rust-exercises-${{ env.slug }}/nrf52-code/boards/dongle-fw/*-fw"
5360
allowUpdates: true
54-
updateOnlyUnreleased: true
61+
updateOnlyUnreleased: true
62+

.github/workflows/weekly-canary-build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Weekly Canary Build
22

3+
env:
4+
CARGO_TERM_COLOR: always # We want colors in our CI output
5+
CARGO_INCREMENTAL: 0 # Don't waste time writing out incremental build files
6+
CARGO_PROFILE_TEST_DEBUG: 0 # These are thrown away anyways, don't produce them
7+
38
on:
49
schedule:
510
- cron: '0 0 * * Mon'
@@ -21,8 +26,10 @@ jobs:
2126
with:
2227
tool: mdslides@0.3,mdbook@0.4,mdbook-mermaid@0.12,flip-link@0.1.10
2328

29+
# `minimal` profile avoids downloading `rustdocs`, `clippy`, etc.
2430
- name: Install targets, update, set default Rust
2531
run: |
32+
rustup profile set minimal
2633
rustup update ${{ matrix.rust-channel }}
2734
rustup default ${{ matrix.rust-channel }}
2835
rustup component add rust-src

build.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@ OUTPUT_NAME=${1:-./output}
66

77
# Build and test the solutions
88
pushd exercise-solutions
9-
cargo test
9+
cargo test --frozen
1010
cargo test --examples
1111
cargo fmt --check
1212
pushd connected-mailbox
13-
cargo test
13+
cargo test --frozen
1414
cargo fmt --check
1515
popd
1616
pushd multi-threaded-mailbox
17-
cargo test
17+
cargo test --frozen
1818
cargo fmt --check
1919
popd
2020
popd
2121
pushd qemu-code
2222
pushd uart-driver
2323
# Build from source because armv8r-none-eabihf isn't Tier 2
24-
RUSTC_BOOTSTRAP=1 cargo build -Zbuild-std=core
24+
RUSTC_BOOTSTRAP=1 cargo build -Zbuild-std=core --frozen
2525
popd
2626
popd
2727
pushd nrf52-code
2828
pushd boards/dk
29-
cargo build --target=thumbv7em-none-eabihf
29+
cargo build --target=thumbv7em-none-eabihf --release
3030
cargo fmt --check
3131
popd
3232
pushd boards/dk-solution
33-
cargo build --target=thumbv7em-none-eabihf
33+
cargo build --target=thumbv7em-none-eabihf --release
3434
cargo fmt --check
3535
popd
3636
pushd boards/dongle
37-
cargo build --target=thumbv7em-none-eabihf
37+
cargo build --target=thumbv7em-none-eabihf --release
3838
cargo fmt --check
3939
popd
4040
pushd radio-app
@@ -45,7 +45,7 @@ for i in usb-lib-solutions/*; do
4545
pushd $i
4646
cargo build --target=thumbv7em-none-eabihf --release
4747
cargo fmt --check
48-
cargo test
48+
cargo test --locked
4949
popd
5050
done
5151
pushd usb-lib
@@ -61,7 +61,7 @@ cargo build --target=thumbv7em-none-eabihf --release
6161
cargo fmt --check
6262
popd
6363
pushd consts
64-
cargo build
64+
cargo build --frozen
6565
cargo fmt --check
6666
popd
6767
pushd puzzle-fw
@@ -74,9 +74,9 @@ cargo fmt --check
7474
popd
7575
popd
7676

77-
# Only build the templates (they will panic at run-time due to the use of todo!)
77+
# Only check the templates (they will panic at run-time due to the use of todo!)
7878
pushd exercise-templates
79-
cargo build
79+
cargo check --frozen
8080
cargo fmt --check
8181
popd
8282

0 commit comments

Comments
 (0)