-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.76 KB
/
ci.yaml
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
59
60
name: CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 1 # since we cache
COLOG: 1
jobs:
test_verilog:
strategy:
matrix:
os: [ubuntu-latest, macos-15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install Verilator
run: |
if [[ "$(uname)" == 'Darwin' ]]; then
brew install verilator
else
sudo apt-get install -y verilator
fi
- name: Manual test
run: |
cd examples/verilog-project
cargo run --package example-verilog-project --bin tutorial
cargo run --package example-verilog-project --bin tutorial # rerun
cargo test --package example-verilog-project --test dynamic_model_tutorial -- --exact main
cargo test --package example-verilog-project --test dpi_tutorial -- --exact main
cargo test --package example-verilog-project --test visibility_works -- --exact main
- name: Cargo test
run: cargo test --package example-verilog-project
test_spade:
strategy:
matrix:
os: [ubuntu-latest, macos-15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Rust Caching
uses: Swatinem/rust-cache@v2
- name: Install Verilator
run: |
if [[ "$(uname)" == 'Darwin' ]]; then
brew install verilator
else
sudo apt-get install -y verilator
fi
- name: Install swim
run: cargo install --locked --git https://gitlab.com/spade-lang/swim --rev 639c5d88db76ef3454af4feef842c37985ca1943
- name: Test
run: cargo test --package example-spade-project