Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,59 @@ jobs:
- name: Run cargo test
run: cargo test --verbose

- name: Run cargo bench
run: cargo bench --verbose

- name: Run cargo clippy (default)
run: cargo clippy -- -D warnings

- name: Run cargo clippy (tests)
run: cargo clippy --tests -- -D warnings

bench:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Run cargo bench
run: cargo bench --verbose

- name: Run cargo clippy (bench bls381_benches)
run: cargo clippy --bench bls381_benches -- -D warnings

- name: Run cargo clippy (bench multi_verify_benches)
run: cargo clippy --bench multi_verify_benches -- -D warnings

build-and-test-windows:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: x86_64-pc-windows-gnu

- name: Add MinGW to PATH
shell: pwsh
run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Run cargo test
env:
CARGO_BUILD_TARGET: x86_64-pc-windows-gnu
run: cargo test --verbose

- name: Run cargo clippy (tests)
env:
CARGO_BUILD_TARGET: x86_64-pc-windows-gnu
run: cargo clippy --tests -- -D warnings
Comment thread
andrei-marinica marked this conversation as resolved.
Outdated
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
Cargo.lock
CVS
.DS_Store
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ categories = ["cryptography"]
path = "src/lib.rs"

[dependencies]
Comment thread
andrei-marinica marked this conversation as resolved.
Outdated
criterion = "0.7.0"
hex = "0.4.0"
criterion = "0.8"
hex = "0.4"

[[bench]]
name = "bls381_benches"
Expand Down
10 changes: 7 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ fn main() {
println!("cargo:rustc-link-lib=static=bls384_256_arm_macos");
println!("cargo:rustc-link-lib=c++");
}
(_, "windows") => {
("x86_64", "windows") => {
println!("cargo:rustc-link-search=native=./executors");
println!("cargo:rustc-link-lib=static=bls384_256_arm_macos");
println!("cargo:rustc-link-lib=stdc++");
println!("cargo:rustc-link-lib=static=bls384_256_amd_windows");
println!("cargo:rustc-link-lib=advapi32");
let env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
if env == "gnu" {
println!("cargo:rustc-link-lib=stdc++");
}
Comment thread
andrei-marinica marked this conversation as resolved.
Outdated
}
_ => panic!("Unsupported target: {os}-{target}"),
}
Expand Down
Loading