picoKontroller/.forgejo/workflows/build.yml

30 lines
928 B
YAML
Raw Normal View History

on: [push, pull_request]
name: Continuous integration
jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
2024-12-21 12:32:43 +01:00
- name: Install APT dependencies
run: apt update && apt install libasound2-dev libdbus-1-dev libpulse0 -y
2024-12-21 12:40:34 +01:00
- name: Repo checkout
uses: actions/checkout@v4
2024-12-21 12:38:58 +01:00
- name: Install Rust toolchain
uses: https://github.com/dtolnay/rust-toolchain@1.76.0
2024-12-21 12:32:43 +01:00
- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
2024-12-21 14:21:08 +01:00
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-toolchain-${{ steps.toolchain.outputs.cachekey }}
2024-12-21 12:32:43 +01:00
- name: Build
run: cargo build --all-features
- name: Test
2024-12-21 14:21:08 +01:00
run: cargo test --all-features