Skip to content

Commit

Permalink
Added CI
Browse files Browse the repository at this point in the history
This is inspired from: https://github.com/TheAwiteb/lprs/
  • Loading branch information
Amjad50 committed Jan 29, 2024
1 parent 3649d4c commit d71fd8e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Download system deps
run: sudo apt-get update -y && sudo apt-get install -y libasound2-dev
- name: Checkout
uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: x86_64-unknown-linux-gnu
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy check
run: cargo clippy --all --all-targets --all-features -- -D warnings
- name: Build
run: cargo build
- name: Test
run: cargo test
verify_msrv:
name: Verify Minimum Supported Rust Version in Cargo.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install or use cached `cargo-msrv`
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-msrv

- name: Verify Minimum Rust Version
run: cargo-msrv verify

0 comments on commit d71fd8e

Please sign in to comment.