-
Notifications
You must be signed in to change notification settings - Fork 38
38 lines (35 loc) · 1 KB
/
build.yml
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
name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
with:
components: rustfmt, clippy
- name: Run rustfmt and fail if any warnings
run: cargo fmt -- --check
- name: Build with feature configuration
run: cargo build --no-default-features --features async
- name: Build
run: cargo build
- name: Run clippy and fail if any warnings
run: cargo clippy -- -D warnings
- name: Run tests with debugs
if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest'
run: RUST_LOG=debug cargo test --verbose
- name: Run tests on Windows
if: matrix.os == 'windows-latest'
run: cargo test