Scheduled build + size #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Scheduled build + size | |
| on: | |
| schedule: | |
| # Run at 04:43 UTC daily | |
| - cron: '43 4 * * *' | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Daily scheduled build of the firmware with the pinned `hisi-riscv` toolchain, plus a | |
| # blinky size report. (The old "nightly upstream toolchain" forward-compat job was | |
| # dropped: ws63-rs pins the custom `hisi-riscv` toolchain whose riscv32imfc target is not a | |
| # builtin in upstream nightly, so a plain `+nightly` build is not meaningful here.) | |
| jobs: | |
| size-report: | |
| name: Build + firmware size | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Install hisi-riscv toolchain | |
| run: bash .github/scripts/install-toolchain.sh | |
| - uses: actions/cache@v5 | |
| with: | |
| # Do not cache target/ (built by the custom hisi-riscv rustc; stale cross-toolchain | |
| # artifacts cause E0463). Registry/git caches are toolchain-agnostic. | |
| path: | | |
| ~/.cargo/registry/ | |
| ~/.cargo/git/ | |
| key: ${{ runner.os }}-cargo-ws63-size-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo-ws63-size- | |
| - name: Build default members (release, links blinky) | |
| run: cargo build --release | |
| - name: Report blinky firmware size | |
| run: | | |
| ELF=target/riscv32imfc-unknown-none-elf/release/blinky | |
| ls -la "$ELF" | |
| SIZE="$(rustc +hisi-riscv --print sysroot)/lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-size" | |
| "$SIZE" "$ELF" || true |