chore: use static buffers in desktop example #95
This file contains 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: Build | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-lib: | |
env: | |
RUSTFLAGS: "-C instrument-coverage" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
rustup override set stable | |
rustup update stable | |
rustup component add rustfmt clippy llvm-tools | |
- name: Install grcov | |
uses: SierraSoftworks/setup-grcov@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
version: latest | |
- name: Check formatting | |
run: cargo fmt --check --all | |
- name: Run clippy | |
run: cargo clippy -- -Dwarnings | |
- name: Run tests | |
run: cargo test | |
- name: Build | |
run: cargo build | |
- name: Process coverage | |
run: > | |
grcov embedded-cli -s embedded-cli/src --binary-path target/debug -t cobertura | |
--branch --ignore-not-existing -o target/coverage.xml | |
--ignore "**/tests/**" --ignore "**/.cargo/registry/**" | |
--ignore "**/embedded-cli-macros/**" --ignore "**/examples/**" | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
files: target/coverage.xml | |
fail_ci_if_error: true | |
verbose: true | |
build-arduino: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
rustup override set nightly | |
rustup update nightly | |
rustup component add rustfmt clippy | |
- name: Install gcc avr | |
run: sudo apt-get install -y avr-libc gcc-avr | |
- name: Check formatting | |
working-directory: examples/arduino | |
run: cargo fmt --check --all | |
- name: Run clippy | |
working-directory: examples/arduino | |
run: cargo clippy -- -Dwarnings | |
- name: Build | |
working-directory: examples/arduino | |
run: cargo build --release |