-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (45 loc) · 1.18 KB
/
validate.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
name: validate
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rustfmt-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
components: rustfmt
- name: Run cargo fmt
run: cargo fmt -- --check
# - name: Run cargo clippy
# run: cargo clippy -- -D warnings
tests:
runs-on: blaze/macos-14
strategy:
matrix:
rust: [ stable, 1.75.0 ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
toolchain: ${{ matrix.rust }}
rustflags: "" # Disable when we're ready
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-${{ matrix.cache }}-${{ matrix.backend }}-${{ hashFiles('**/Cargo.toml') }}
- name: Run tests
run: cargo test --all