-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (50 loc) · 1.46 KB
/
pull.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: PR Verification
on:
pull_request:
branches: [master]
jobs:
cargo:
strategy:
matrix:
runner:
# Release already exercises a build, so this only needs to worry about testable targets
- ubuntu-latest # x86_64-unknown-linux-gnu
- macos-13 # x86_64-apple-darwin
- macos-latest # aarch64-apple-darwin
- windows-latest # x86_64-pc-windows-msvc
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ matrix.runner }}
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --all-targets --all-features
nix:
strategy:
matrix:
runner:
- ubuntu-latest # x86_64-linux
- macos-13 # x86_64-darwin
- macos-latest # aarch64-darwin
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v16
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Format
run: nix fmt -- --check .
- name: Build
run: nix build
verify:
needs: [cargo, nix]
runs-on: ubuntu-latest
steps:
- run: echo "Verified!"