Skip to content

Add size reports

Add size reports #1647

Workflow file for this run

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_test:
runs-on: ubuntu-latest
strategy:
matrix:
crypto-backend: ['rustcrypto', 'mbedtls', 'openssl']
features: ['', 'alloc', 'os']
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: Fmt
if: matrix.features == 'os' && matrix.crypto-backend == 'rustcrypto'
run: cargo fmt -- --check
- name: Clippy - All
if: matrix.features == 'os' && matrix.crypto-backend == 'rustcrypto'
run: cargo clippy --no-deps -- -Dwarnings
- name: Clippy - baremetal
if: matrix.features == '' && matrix.crypto-backend == 'rustcrypto'
run: cd rs-matter; cargo clippy --no-deps --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},defmt --target riscv32imac-unknown-none-elf -- -Dwarnings
- name: Clippy
run: cd rs-matter; cargo clippy --no-deps --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},log -- -Dwarnings
- name: Clippy | defmt
run: export DEFMT_LOG=trace; cd rs-matter; cargo clippy --no-deps --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},defmt -- -Dwarnings
- name: Build
run: cd rs-matter; cargo build --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},log
- name: Benchmark
run: cd rs-matter; cargo bench --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},log
- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}
- name: Test
if: matrix.features == 'os'
run: cd rs-matter; cargo test --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},log
- name: Examples
if: matrix.features == 'os' && matrix.crypto-backend == 'rustcrypto'
run: cargo build --examples --release --no-default-features --features ${{matrix.crypto-backend}},${{matrix.features}},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: Xtask Fmt
if: matrix.features == 'os' && matrix.crypto-backend == 'rustcrypto'
run: cd xtask; cargo fmt -- --check
- name: Xtask Clippy
if: matrix.features == 'os' && matrix.crypto-backend == 'rustcrypto'
run: cd xtask; cargo clippy --no-deps -- -Dwarnings
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports

Check failure on line 103 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 103
if: ${{ !env.ACT }}
with:
platform-name: linux