Add size reports #5
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: "50 6 * * *" | |
| workflow_dispatch: | |
| env: | |
| RUST_TOOLCHAIN: stable | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build_and_run_size_report: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Rust | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ env.RUST_TOOLCHAIN }} | |
| components: rustfmt, clippy, rust-src | |
| - name: Setup | Rust no-std target | |
| run: rustup target add riscv32imac-unknown-none-elf | |
| - name: Install libdbus | |
| run: sudo apt-get install -y libdbus-1-dev | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Checkout submodules & Matter CPP Bootstrap | |
| uses: ./.github/actions/checkout-submodules-and-cpp-bootstrap | |
| with: | |
| platform: linux | |
| - name: Set up environment for size reports | |
| uses: ./.github/actions/setup-size-reports | |
| if: ${{ !env.ACT }} | |
| with: | |
| gh-context: ${{ toJson(github) }} | |
| - name: Examples | |
| run: cargo build --examples --release --no-default-features --features os,rustcrypto,log | |
| - name: Prepare bloat report from the previous builds | |
| run: | | |
| .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ | |
| linux rs-matter onoff-light-bt \ | |
| target/release/onoff_light_bt \ | |
| /tmp/bloat_reports/ | |
| .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ | |
| linux rs-matter dimmable_light \ | |
| target/release/dimmable_light \ | |
| /tmp/bloat_reports/ | |
| .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ | |
| linux rs-matter speaker \ | |
| target/release/speaker \ | |
| /tmp/bloat_reports/ | |
| - name: Uploading Size Reports | |
| uses: ./.github/actions/upload-size-reports | |
| if: ${{ !env.ACT }} | |
| with: | |
| platform-name: linux |