-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.01 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
platform:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# make sure we are on rust 1.79
# see https://github.com/tuffy/bitstream-io/commit/241eaed73b0cd814640ceaf01b8220e5c98927d6#commitcomment-143198388
# TODO remove this once github is on a newer version of rust
- name: Set up Rust
run: rustup update
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose