-
Notifications
You must be signed in to change notification settings - Fork 33
58 lines (54 loc) · 1.54 KB
/
build-and-test.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
53
54
55
56
57
58
name: Build and test
on:
push:
pull_request:
jobs:
build-and-test:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- run: |-
echo CARGO_HOME=$GITHUB_WORKSPACE/.cargo >> $GITHUB_ENV
echo $GITHUB_WORKSPACE/target/debug >> $GITHUB_PATH
shell: bash
- run: cargo build --locked
- run: cargo test
- uses: dtolnay/install-buck2@latest
- name: Build example projects (Ubuntu, macOS)
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
run: |-
pushd examples/01-intro
reindeer buckify
buck2 run "//project:test"
popd
pushd examples/02-hybrid
reindeer buckify
buck2 run "//project:test"
cargo run -p project
popd
pushd examples/03-complex-fixups
reindeer buckify
buck2 run "//project:test"
popd
- name: Build example projects (Windows)
if: matrix.os == 'windows'
run: |-
cd examples/01-intro
& reindeer buckify
& buck2 run "//project:test"
cd ../..
cd examples/02-hybrid
& reindeer buckify
& buck2 run "//project:test"
& cargo run -p project
cd ../..
cd examples/03-complex-fixups
& reindeer buckify
& buck2 run "//project:test"
cd ../..