Skip to content

Commit b15f2ad

Browse files
committed
ci & make
1 parent 03b0e58 commit b15f2ad

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: zkemail-cairo-ci
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
jobs:
9+
check:
10+
name: Format and Lint
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.9"
21+
22+
- name: Set up Rust
23+
uses: actions-rust-lang/setup-rust-toolchain@v1
24+
25+
- name: Set up Cairo0
26+
run: make
27+
28+
- name: Run Rust fmt check
29+
run: cargo fmt --all -- --check
30+
31+
- name: Run Rust clippy check
32+
run: cargo clippy -- -D warnings
33+
34+
- name: Run Cairo fmt check
35+
run: make format-check
36+
37+
test:
38+
name: Run Tests
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Checkout Code
43+
uses: actions/checkout@v3
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: "3.9"
49+
50+
- name: Set up Rust
51+
uses: actions-rust-lang/setup-rust-toolchain@v1
52+
53+
- name: Set up Cairo0
54+
run: make
55+
56+
- name: Install Nextest
57+
uses: taiki-e/install-action@nextest
58+
59+
- name: Run tests
60+
run: cargo nextest run
61+

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Makefile
2+
3+
.PHONY: all setup format format-check
4+
5+
# Default target
6+
all: setup
7+
8+
# Run setup.sh
9+
setup:
10+
bash setup.sh
11+
12+
# Run cairo-format inplace
13+
format:
14+
source ./venv/bin/activate && cairo-format -i *.cairo
15+
16+
# Run cairo-format check
17+
format-check:
18+
source ./venv/bin/activate && cairo-format -c *.cairo

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The project is implemented in Cairo, a language designed for creating provable p
2020

2121
2. **Set Up Cairo0 compiler**:
2222
```bash
23-
./setup.sh
23+
make
2424
```
2525

2626
3. **Run the example verifications**:

0 commit comments

Comments
 (0)