-
Notifications
You must be signed in to change notification settings - Fork 7
155 lines (131 loc) · 3.82 KB
/
Copy pathci.yml
File metadata and controls
155 lines (131 loc) · 3.82 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: arm-risc0 CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RISC0_TOOLCHAIN_VERSION: 3.0.3
jobs:
taplo:
name: Taplo Format Check
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- name: Install just
uses: extractions/setup-just@v3
- name: Run Taplo format check
run: taplo fmt --check
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.89"
components: rustfmt
- name: Check formatting (main workspace)
run: cargo fmt --all -- --check
- name: Check formatting (arm_circuits workspace)
run: cargo fmt --all -- --check
working-directory: arm_circuits
clippy:
name: Clippy
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.89"
components: clippy
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Run clippy (main workspace)
run: cargo clippy --workspace --all-targets -- -D warnings
build:
name: Build
strategy:
matrix:
os: [macos-latest]
rust: ["1.89"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
arm_circuits
# - name: Install RISC0 toolchain
# run: |
# curl -L https://risczero.com/install | bash
# $HOME/.risc0/bin/rzup install cargo-risczero $RISC0_TOOLCHAIN_VERSION
# $HOME/.risc0/bin/rzup install r0vm $RISC0_TOOLCHAIN_VERSION
- name: Build main workspace
run: cargo build --workspace --all-targets
## Skip building arm_circuits workspace for now due to limited risc0-toolchain download requests
# - name: Build arm_circuits workspace
# run: cargo build --workspace --all-targets
# working-directory: arm_circuits
test:
name: Test
strategy:
matrix:
# os: [ubuntu-latest, macos-latest]
os: [macos-latest]
rust: ["1.89"]
runs-on: ${{ matrix.os }}
env:
RISC0_DEV_MODE: 1 # Use dev mode for faster testing
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Run tests (main workspace)
run: cargo test --workspace
test-release:
name: Test Release
runs-on: macos-latest
env:
RISC0_DEV_MODE: 1 # Use dev mode for faster testing
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Run release tests (main workspace)
run: cargo test --workspace --release
timeout-minutes: 60