-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (48 loc) · 1.67 KB
/
Copy pathbuild.yml
File metadata and controls
53 lines (48 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build
# Runs for each commit/PR, but not tag push
on:
push:
branches:
- "**"
pull_request:
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux Dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.9.0
#- name: cargo fmt
# run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features
# setup-rust-toolchain adds `-D warnings` automatically
# - name: Allow warnings in builds
# run: echo "RUSTFLAGS=" >> $GITHUB_ENV
- name: Build
run: cargo build --verbose
- name: Run Unit Tests
run: cargo test --all-targets --all-features
- name: Run Integration Tests
run: cargo test --all-targets --all-features -- --ignored --show-output --test-threads=1
cargo-hack:
name: cargo-hack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux Dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.9.0
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
# - name: Allow warnings in builds (for now)
# run: echo "RUSTFLAGS=" >> $GITHUB_ENV
- run: cargo hack check --feature-powerset --no-dev-deps