Merge branch 'tshakah-smoltcp-0.12' #56
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: GitHub Actions CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
# See https://github.com/BamPeers/rust-ci-github-actions-workflow | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose --all-targets | |
- name: Run tests | |
run: cargo test --verbose --all-targets | |
- name: Clippy | |
run: cargo clippy --all-targets | |
coverage: | |
env: | |
PROJECT_NAME_UNDERSCORE: cotton | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort | |
RUSTDOCFLAGS: -Cpanic=abort | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-dependencies | |
with: | |
path: | | |
~/.cargo/.crates.toml | |
~/.cargo/.crates2.json | |
~/.cargo/bin | |
~/.cargo/registry/index | |
~/.cargo/registry/cache | |
target | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} | |
- name: Install Tools | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: grcov,cargo-llvm-cov | |
- name: Generate test result and coverage report | |
run: | | |
cargo llvm-cov --workspace --exclude systemtests --all-targets --codecov --output-path ./codecov.json | |
- name: Upload to CodeCov | |
uses: codecov/codecov-action@v5 | |
with: | |
# required for ALL repositories nowadays: | |
# see https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions | |
# and https://github.com/codecov/codecov-action/issues/1623 | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./codecov.json |