-
Notifications
You must be signed in to change notification settings - Fork 29
36 lines (36 loc) · 1.06 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
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 project (Ubuntu, macOS)
run: |-
cd example
reindeer --third-party-dir third-party buckify
buck2 init --git
buck2 run "//project:test"
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
- name: Build example project (Windows)
run: |-
cd example
& reindeer --third-party-dir third-party buckify
& buck2 init --git
& buck2 run "//project:test"
if: matrix.os == 'windows'