-
Notifications
You must be signed in to change notification settings - Fork 54
51 lines (42 loc) · 1.13 KB
/
ci.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
name: Build and Test
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: git checkout
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Set up Rust cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: borgo-${{ hashFiles('**/Cargo.lock') }}
- name: Build compiler
run: |
nix develop --command \
cargo build
- name: Run Test suite
run: |
nix develop --command \
just test-runner
nix develop --command \
just run-examples
- name: Check snapshots haven't updated
run: |
if [[ `git status --porcelain` ]]; then
echo "Some files have changed, forgot to update snapshots?"
git diff
exit 1
fi