Skip to content

Commit

Permalink
Merge branch 'main' into improving_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
diegokingston authored Sep 9, 2024
2 parents 814425e + bc02f42 commit b715125
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 44 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
- name: Run cargo check cli and stark instruments
run: |
cargo check --features cli,instruments
- name: Run cargo check cli, stark instruments and parallel
run: |
cargo check --features cli,instruments,parallel
- name: Run cargo check for math with no-std
run: cargo check --package lambdaworks-math --no-default-features

- name: Run cargo check for math with wasm target
run: cargo check --package lambdaworks-math --no-default-features --target wasm32-unknown-unknown

Expand Down Expand Up @@ -120,9 +120,9 @@ jobs:

- name: Run tests with no std
run: cargo test --package lambdaworks-math --package lambdaworks-crypto --no-default-features

- name: Run tests for math with no std + alloc
run: cargo test --package lambdaworks-math --no-default-features --features=alloc,lambdaworks-serde-string,lambdaworks-serde-binary
run: cargo test --package lambdaworks-math --no-default-features --features=alloc,lambdaworks-serde-string,lambdaworks-serde-binary

- name: Run tests and generate code coverage
run: make coverage
Expand Down Expand Up @@ -153,25 +153,42 @@ jobs:
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Run wasm-pack tests in firefox
run: cd provers/cairo && wasm-pack test --release --firefox --headless -- --features wasm
run: cd provers/cairo && wasm-pack test --release --firefox --headless -- --features wasm

- name: Run wasm-pack tests in chrome
run: cd provers/cairo && wasm-pack test --release --chrome --headless -- --features wasm

test_macos:
name: Test (macOS, Apple sillicon)
runs-on: [self-hosted, macOS]
runs-on: macos-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3

- name: install GCC/GMP
run: |
brew install gcc
brew install gmp
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy

- name: Python3 build
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"

- name: Install cairo-lang toolchain and dependencies
env:
CFLAGS: "-I/opt/homebrew/opt/gmp/include"
LDFLAGS: "-L/opt/homebrew/opt/gmp/lib"
run: pip install -r provers/cairo/requirements.txt

- name: Run clippy
run: make clippy-metal

Expand Down
88 changes: 51 additions & 37 deletions .github/workflows/criterion_benchs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]

permissions:
# deployments permission to deploy GitHub pages website
Expand All @@ -17,46 +17,60 @@ jobs:
env:
CARGO_TERM_COLOR: always
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: actions/checkout@v3
- name: Run benchmark
run: |
cargo bench --no-fail-fast --bench "criterion_fft" \
--bench "criterion_polynomial" \
-- --output-format bencher | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txt
benchmark-data-dir-path: "./bench"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}
- uses: actions/checkout@v3
- name: Run benchmark
run: |
cargo bench --no-fail-fast --bench "criterion_fft" \
--bench "criterion_polynomial" \
-- --output-format bencher | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "cargo"
output-file-path: output.txt
benchmark-data-dir-path: "./bench"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}
criterion_bench_macos:
name: Criterion benches (macOS, Apple sillicon)
runs-on: [self-hosted, macOS]
runs-on: macos-latest
env:
CARGO_TERM_COLOR: always
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: actions/checkout@v3
- name: Run benchmark
run: |
cargo bench -F metal --no-fail-fast --bench "criterion_metal" \
-- --output-format bencher | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txt
benchmark-data-dir-path: "./bench"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}
- uses: actions/checkout@v3
- name: install GCC/GMP
run: |
brew install gcc
brew install gmp
- name: Python3 build
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Install cairo-lang toolchain and dependencies
env:
CFLAGS: "-I/opt/homebrew/opt/gmp/include"
LDFLAGS: "-L/opt/homebrew/opt/gmp/lib"
run: pip install -r provers/cairo/requirements.txt
- name: Run benchmark
run: |
cargo bench -F metal --no-fail-fast --bench "criterion_metal" \
-- --output-format bencher | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "cargo"
output-file-path: output.txt
benchmark-data-dir-path: "./bench"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}

0 comments on commit b715125

Please sign in to comment.