-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (42 loc) · 1.29 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
43
44
45
46
47
48
49
50
51
52
53
name: Rust test
on:
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- name: Linux-amd64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
command: cargo
steps:
- uses: actions/checkout@v4
- name: Install requirements (Linux)
if: matrix.runner == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.target }}"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# Only install cross if we need it
# Install via cargo-binstall which I found faster
- name: Install Cross
if: matrix.command == 'cross'
shell: bash
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm cross
- name: Test
run: cargo test --workspace --no-fail-fast