Skip to content

Commit

Permalink
add CI colors, comment on speedups
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelraz committed Feb 12, 2025
1 parent 923d14e commit 2130261
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build sample material

env:
CARGO_TERM_COLOR: always # We want colors in our CI output
CARGO_INCREMENTAL: 0 # Don't waste time writing out incremental build files
CARGO_PROFILE_TEST_DEBUG: 0 # These are thrown away anyways, don't produce them

on:
push:
pull_request:
Expand All @@ -17,8 +22,10 @@ jobs:
with:
tool: [email protected],[email protected],[email protected],[email protected]

# `minimal` profile avoids downloading `rustdocs`, `clippy`, etc.
- name: Install targets
run: |
rustup set profile minimal
rustup target add thumbv7em-none-eabihf
rustup component add rust-src
rustup component add rustfmt
Expand Down Expand Up @@ -51,4 +58,5 @@ jobs:
with:
artifacts: "./rust-exercises-${{ env.slug }}.zip,./rust-exercises-${{ env.slug }}/nrf52-code/boards/dongle-fw/*-fw"
allowUpdates: true
updateOnlyUnreleased: true
updateOnlyUnreleased: true

7 changes: 7 additions & 0 deletions .github/workflows/weekly-canary-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Weekly Canary Build

env:
CARGO_TERM_COLOR: always # We want colors in our CI output
CARGO_INCREMENTAL: 0 # Don't waste time writing out incremental build files
CARGO_PROFILE_TEST_DEBUG: 0 # These are thrown away anyways, don't produce them

on:
schedule:
- cron: '0 0 * * Mon'
Expand All @@ -21,8 +26,10 @@ jobs:
with:
tool: [email protected],[email protected],[email protected],[email protected]

# `minimal` profile avoids downloading `rustdocs`, `clippy`, etc.
- name: Install targets, update, set default Rust
run: |
rustup profile set minimal
rustup update ${{ matrix.rust-channel }}
rustup default ${{ matrix.rust-channel }}
rustup component add rust-src
Expand Down
22 changes: 11 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ OUTPUT_NAME=${1:-./output}

# Build and test the solutions
pushd exercise-solutions
cargo test
cargo test --frozen
cargo test --examples
cargo fmt --check
pushd connected-mailbox
cargo test
cargo test --frozen
cargo fmt --check
popd
pushd multi-threaded-mailbox
cargo test
cargo test --frozen
cargo fmt --check
popd
popd
pushd qemu-code
pushd uart-driver
# Build from source because armv8r-none-eabihf isn't Tier 2
RUSTC_BOOTSTRAP=1 cargo build -Zbuild-std=core
RUSTC_BOOTSTRAP=1 cargo build -Zbuild-std=core --frozen
popd
popd
pushd nrf52-code
pushd boards/dk
cargo build --target=thumbv7em-none-eabihf
cargo build --target=thumbv7em-none-eabihf --release
cargo fmt --check
popd
pushd boards/dk-solution
cargo build --target=thumbv7em-none-eabihf
cargo build --target=thumbv7em-none-eabihf --release
cargo fmt --check
popd
pushd boards/dongle
cargo build --target=thumbv7em-none-eabihf
cargo build --target=thumbv7em-none-eabihf --release
cargo fmt --check
popd
pushd radio-app
Expand All @@ -45,7 +45,7 @@ for i in usb-lib-solutions/*; do
pushd $i
cargo build --target=thumbv7em-none-eabihf --release
cargo fmt --check
cargo test
cargo test --locked
popd
done
pushd usb-lib
Expand All @@ -61,7 +61,7 @@ cargo build --target=thumbv7em-none-eabihf --release
cargo fmt --check
popd
pushd consts
cargo build
cargo build --frozen
cargo fmt --check
popd
pushd puzzle-fw
Expand All @@ -74,9 +74,9 @@ cargo fmt --check
popd
popd

# Only build the templates (they will panic at run-time due to the use of todo!)
# Only check the templates (they will panic at run-time due to the use of todo!)
pushd exercise-templates
cargo build
cargo check --frozen
cargo fmt --check
popd

Expand Down

0 comments on commit 2130261

Please sign in to comment.