Skip to content

CI

CI #828

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
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:
features: ['std', 'os', 'zeroconf']
steps:
- name: Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy, rust-src
- name: Install libdbus
run: sudo apt-get install -y libdbus-1-dev
- name: Install libavahi-client
run: sudo apt-get install -y libavahi-client-dev
- name: Checkout
uses: actions/checkout@v3
- name: Fmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --no-deps --no-default-features --features ${{matrix.features}} -- -Dwarnings
- name: Clippy - defmt
run: export DEFMT_LOG=trace; cargo clippy --no-deps --no-default-features --features ${{matrix.features}},defmt -- -Dwarnings
- name: Build | no_std
run: cargo build --no-default-features --features log
- name: Build
run: cargo build --no-default-features --features ${{matrix.features}}
- name: Examples
if: matrix.features == 'os'
run: cargo build --release --examples --features ${{matrix.features}},nix,log,examples
- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT && matrix.features == 'os' }}
with:
gh-context: ${{ toJson(github) }}
- name: Prepare bloat report from the previous builds
if: matrix.features == 'os'
run: |
python .github/scripts/memory/gh_sizes.py \
light infologs-optz-ltofat x86_64-unknown-linux-gnu \
target/release/examples/light \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
light_eth infologs-optz-ltofat x86_64-unknown-linux-gnu \
target/release/examples/light_eth \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT && matrix.features == 'os' }}
with:
platform-name: cross-platform