-
Notifications
You must be signed in to change notification settings - Fork 32
45 lines (39 loc) · 1.02 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
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: cargo build --locked
- run: cargo test
- run: |
mkdir -p shim/third-party/rust/top
cat >> shim/third-party/rust/top/main.rs<<EOF
fn main() {}
EOF
cat >> shim/third-party/rust/Cargo.toml<<EOF
[workspace]
[package]
name = "rust-third-party"
version = "0.0.0"
publish = false
edition = "2021"
[[bin]]
name = "top"
path = "top/main.rs"
[dependencies]
anyhow = "1.0.65"
EOF
cargo run -- --third-party-dir shim/third-party/rust buckify
cat shim/third-party/rust/BUCK
shell: bash
if: matrix.os != 'windows'