-
Notifications
You must be signed in to change notification settings - Fork 36
105 lines (83 loc) · 2.86 KB
/
ci.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
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
# Expander CI: unit tests on Github's servers
# it runs on both macos and ubuntu avx2
# it does not check for avx512 -- this is not available on github
name: expander-rs CI
on: [pull_request, push]
env:
RUSTFLAGS: "-Dwarnings -C target-cpu=native"
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
ACTIONS_RUNNER_DEBUG: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Setup Dependencies
run: sudo apt-get install -y build-essential openmpi-bin libopenmpi-dev
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all
build-and-test:
name: Build and Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: 7950x3d
feature: avx512f
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
prefix-key: "mpi-v5.0.6"
- uses: actions/setup-go@v5
if: matrix.os != '7950x3d'
with:
go-version: '>=1.22.0'
- name: Setup Dependencies for MacOS workflow
if: matrix.os == 'macos-latest'
run: brew install gcc make openmpi
- name: Setup Dependencies for Ubuntu workflow
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y build-essential openmpi-bin libopenmpi-dev
- name: Setup ECC Library
run: |
cd ~
rm -rf ExpanderCompilerCollection
git clone -b dev https://github.com/PolyhedraZK/ExpanderCompilerCollection.git
cd ExpanderCompilerCollection
./build-rust.sh
- name: Download test data
run: cargo run --bin=dev-setup --release
- name: Build project
run: cargo build --all-features --release
- name: Run unit tests
run: cargo test --all-features --release --workspace
- name: Run E2E tests
run: ./scripts/test_recursion.py
- name: Run benchmarks on Github Workflows
if: matrix.os != '7950x3d'
run: |
cargo run --bin=gkr --release -- -t 4 -f gf2ext128
cargo run --bin=gkr --release -- -t 4 -f m31ext3
cargo run --bin=gkr --release -- -t 4 -f fr
- name: Run benchmarks on AVX512 7950x3d
if: matrix.os == '7950x3d'
run: |
cargo run --bin=gkr --release -- -t 16 -f gf2ext128
cargo run --bin=gkr --release -- -t 16 -f m31ext3
cargo run --bin=gkr --release -- -t 16 -f fr