Skip to content

Commit

Permalink
Merge branch 'dev' into feature/orion
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfloatersu committed Jan 14, 2025
2 parents 7fe83ca + 5b5f8df commit 16a67f7
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 19 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Run Benchmarks

env:
RUSTFLAGS: "-Dwarnings -C target-cpu=native"
RUST_BACKTRACE: 1
ACTIONS_RUNNER_DEBUG: true

on:
push:
pull_request:
Expand Down Expand Up @@ -29,6 +34,8 @@ jobs:
run: cargo install cargo-criterion
- name: Install mpi
run: python3 ./scripts/install.py
- name: Install build dependencies
run: sudo apt-get install -y build-essential
- name: Setup
run: cargo run --bin=dev-setup --release
- name: Run benchmark
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
RUSTFLAGS: "-Dwarnings -C target-cpu=native"
RUST_BACKTRACE: 1
ACTIONS_RUNNER_DEBUG: true

jobs:
build:
Expand All @@ -23,18 +24,32 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Setup Dependencies
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install gcc make
else
sudo apt-get install -y build-essential
fi
shell: bash

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@v2
with:
# The prefix cache key, this can be changed to start a new cache manually.
prefix-key: "mpi-v5.0.6" # update me if brew formula changes to a new version
prefix-key: "mpi-v5.0.6"

- name: Install MPI
run: python3 ./scripts/install.py

- name: Set RUSTFLAGS for AVX
if: matrix.feature != ''
run: echo "RUSTFLAGS=$RUSTFLAGS -C target-feature=+${{ matrix.feature }}" >> $GITHUB_ENV

- name: Prepare binary
run: cargo build --release --bin expander-exec

- name: Upload release asset
uses: actions/github-script@v6
with:
Expand All @@ -46,4 +61,4 @@ jobs:
release_id: ${{ github.event.release.id }},
name: '${{ matrix.binary_name }}',
data: await fs.readFile('target/release/expander-exec')
});
});
32 changes: 27 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [pull_request, push]
env:
RUSTFLAGS: "-Dwarnings -C target-cpu=native"
RUST_BACKTRACE: 1
ACTIONS_RUNNER_DEBUG: true

jobs:
lint:
Expand All @@ -15,6 +16,9 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Setup Dependencies
run: |
sudo apt-get install -y build-essential
- run: python3 ./scripts/install.py
- run: cargo fmt --all -- --check
- run: cargo clippy --all
Expand All @@ -35,18 +39,30 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
# The prefix cache key, this can be changed to start a new cache manually.
prefix-key: "mpi-v5.0.6" # update me if brew formula changes to a new version
prefix-key: "mpi-v5.0.6"
- name: Setup Dependencies
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install gcc make
else
sudo apt-get install -y build-essential
fi
- name: Set RUSTFLAGS for AVX
if: matrix.feature != ''
run: echo "RUSTFLAGS=$RUSTFLAGS -C target-feature=+${{ matrix.feature }}" >> $GITHUB_ENV
- name: Build and Test
- name: Setup
run: |
python3 ./scripts/install.py
mpiexec --version
- name: download data
run: |
cargo run --bin=dev-setup --release
- name: Unit Tests
run: |
cargo build --all-features --release
cargo test --all-features --release --workspace
- name: E2E Test
run: |
./scripts/test_recursion.py
gkr-e2e:
Expand Down Expand Up @@ -84,8 +100,14 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
# The prefix cache key, this can be changed to start a new cache manually.
prefix-key: "giggidy" # update me if brew formula changes to a new version
prefix-key: "mpi-v5.0.6"
- name: Setup Dependencies
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install gcc make
else
sudo apt-get install -y build-essential
fi
- name: Set RUSTFLAGS for AVX
if: matrix.feature != ''
run: echo "RUSTFLAGS=$RUSTFLAGS -C target-feature=+${{ matrix.feature }}" >> $GITHUB_ENV
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/nightly_e2e.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: E2E Tests

env:
RUSTFLAGS: "-Dwarnings -C target-cpu=native"
RUST_BACKTRACE: 1
ACTIONS_RUNNER_DEBUG: true

on:
schedule:
# This will run the workflow every day at 2:00 AM UTC
Expand All @@ -18,20 +23,26 @@ jobs:
runs-on: 7950x3d

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4 # Updated to v4

- name: Setup Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-09-01
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
with:
# The prefix cache key, this can be changed to start a new cache manually.
prefix-key: "mpi-v5.0.6" # update me if brew formula changes to a new version

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5 # Updated to v5
with:
go-version: '^1.16'

Expand Down Expand Up @@ -65,10 +76,4 @@ jobs:
RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo +nightly run --release --bin=gkr -- -s keccak -f gf2ext128 -t 16
RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo +nightly run --release --bin=gkr -- -s keccak -f m31ext3 -t 16
RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo +nightly run --release --bin=gkr -- -s keccak -f fr -t 16
RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo +nightly run --release --bin=gkr -- -s poseidon -f m31ext3 -t 16
# # Run MPI tests
# RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" mpiexec -n 2 cargo +nightly run --release --bin=gkr-mpi -- -s keccak -f gf2ext128
# RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" mpiexec -n 2 cargo +nightly run --release --bin=gkr-mpi -- -s keccak -f m31ext3
# RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" mpiexec -n 2 cargo +nightly run --release --bin=gkr-mpi -- -s keccak -f fr
# RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" mpiexec -n 2 cargo +nightly run --release --bin=gkr-mpi -- -s poseidon -f m31ext3
RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo +nightly run --release --bin=gkr -- -s poseidon -f m31ext3 -t 16
4 changes: 2 additions & 2 deletions scripts/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

if __name__ == "__main__":
if platform == "darwin": # mac os
subprocess.run(["brew", "install", "openmpi"])
subprocess.run(["brew", "install", "gcc", "make", "openmpi"])
else:
pass # Do nothing, assuming mpi has already been installed
pass

0 comments on commit 16a67f7

Please sign in to comment.