-
Notifications
You must be signed in to change notification settings - Fork 8
102 lines (94 loc) · 3 KB
/
Copy pathrust.yml
File metadata and controls
102 lines (94 loc) · 3 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
name: Build and Test Jolt-Atlas
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
branches: ['**', main]
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
fmt:
name: Format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: cargo fmt
run: cargo fmt --all --check
clippy-and-test:
name: Clippy & Test (${{ matrix.variant.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- name: default
clippy_args: --workspace --all-targets
test_args: --workspace
- name: zk
clippy_args: -p jolt-atlas-core --all-targets --features zk
test_args: -p jolt-atlas-core --features zk
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- name: cargo clippy
run: cargo clippy ${{ matrix.variant.clippy_args }}
- uses: taiki-e/install-action@nextest
- name: Run tests
run: cargo nextest run ${{ matrix.variant.test_args }}
test-gpt2:
name: GPT-2 Prove & Verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Download GPT-2 ONNX model
run: |
python -m venv .venv
source .venv/bin/activate
python scripts/download_gpt2.py
- uses: taiki-e/install-action@nextest
- name: Run GPT-2 test
run: cargo nextest run --workspace --run-ignored ignored-only -E 'test(test_gpt2)'
test-bge:
name: BGE Prove & Verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Download BGE ONNX model
run: |
python -m venv .venv
source .venv/bin/activate
python scripts/download_bge_small_en_v1_5.py
- uses: taiki-e/install-action@nextest
- name: Run BGE test
run: cargo nextest run --workspace --run-ignored ignored-only -E 'test(test_bge_small_en_v1_5)'
build-wasm-atlas-onnx-tracer:
name: Build Wasm - atlas-onnx-tracer
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-Adead_code -Aunused_imports -Aunused_variables -Aunused_mut"
steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Build Wasm
run: cargo build -p atlas-onnx-tracer --release --target wasm32-unknown-unknown