Pigg 552 #1565
Workflow file for this run
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 and Test with Coverage | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
schedule: # Build every day at 5PM UTC | |
- cron: '0 17 * * *' | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: -C instrument-coverage | |
LLVM_PROFILE_FILE: pigg-%p-%m.profraw | |
RUST_BACKTRACE: 1 | |
jobs: | |
markdown-link-check: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
Format-check: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run cargo fmt check | |
run: cargo fmt --all -- --check | |
arm7-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean up files | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Add target | |
run: rustup target add armv7-unknown-linux-gnueabihf | |
- name: Install Linker | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-arm-linux-gnueabihf | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Clippy and Build for armv7 | |
run: make armv7 | |
aarch64-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean up files | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Add target | |
run: rustup target add aarch64-unknown-linux-gnu | |
- name: Install Linkers | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-aarch64-linux-gnu | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Clippy and Build for aarch64 | |
run: make aarch64 | |
porky-release-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: add thumbv6m-none-eabi target | |
run: rustup target add thumbv6m-none-eabi | |
- name: Release build of porky for Pico | |
run: cd porky && RUSTFLAGS= cargo build --release | |
clippy-build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-14, ubuntu-24.04, windows-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy,llvm-tools-preview | |
- uses: Swatinem/rust-cache@v2 | |
- name: InstallCoverageTools | |
if: runner.os != 'Windows' | |
run: cargo install grcov | |
- name: Setup LCOV | |
if: runner.os != 'Windows' | |
uses: hrishikesh-kadam/setup-lcov@v1 | |
with: | |
ref: HEAD | |
- name: Clippy build and test - non-Linux | |
if: runner.os != 'Linux' | |
run: make clippy build test | |
- name: Clippy build and test - Linux | |
if: runner.os == 'Linux' | |
run: | | |
make clippy build | |
sudo apt-get update | |
sudo apt-get install weston | |
weston -Bheadless -Sweston & | |
make test | |
env: | |
WAYLAND_DISPLAY: weston | |
- name: Clean up coverage | |
if: runner.os != 'Windows' | |
run: | | |
grcov . --binary-path target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info | |
lcov --ignore-errors empty,empty --remove lcov.info -o lcov.info --erase-functions "(?=^.*fmt).+" | |
- name: UploadCoverage | |
if: runner.os != 'Windows' | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
file: lcov.info | |
flags: unittests | |
name: codecov-umbrella | |
verbose: true |