diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..1f8ebd69 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + workflow_dispatch: + inputs: + releaseType: + description: 'Release type' + required: true + default: 'minor' + type: choice + options: + - patch + - minor + - major + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Bump rust crate versions, commit, and tag + working-directory: wrappers/rust + # https://github.com/pksunkara/cargo-workspaces?tab=readme-ov-file#version + run: | + cargo install cargo-workspaces + cargo workspaces version ${{ inputs.releaseType }} -y --no-individual-tags -m "Bump rust crates' version" + - name: Create draft release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + LATEST_TAG=$(git describe --tags --abbrev=0) + gh release create $LATEST_TAG --generate-notes -d --verify-tag -t "Release $LATEST_TAG" diff --git a/scripts/bump_rust_versions.sh b/scripts/bump_rust_versions.sh deleted file mode 100755 index e633fa17..00000000 --- a/scripts/bump_rust_versions.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -new_version=$1 - -if [ -z "$new_version" ]; then - echo "Usage: ./bump_rust_versions.sh " - exit 1 -fi - -cd wrappers/rust - -# Update the version in each member crate's Cargo.toml -for crate in $(cat Cargo.toml | grep '"[a-z].*"' | tr -d '[" ],'); do - sed -i "/^\[package\]/,/^$/ s/^version = \".*\"/version = \"$new_version\"/" $crate/Cargo.toml -done \ No newline at end of file diff --git a/wrappers/rust/Cargo.toml b/wrappers/rust/Cargo.toml index 9d3e0e1a..2e7631aa 100644 --- a/wrappers/rust/Cargo.toml +++ b/wrappers/rust/Cargo.toml @@ -9,3 +9,17 @@ members = [ "icicle-curves/icicle-bn254", "icicle-curves/icicle-grumpkin", ] +exclude = [ + "icicle-curves/icicle-curve-template", +] + +[workspace.package] +version = "1.6.0" +edition = "2021" +authors = [ "Ingonyama" ] +homepage = "https://www.ingonyama.com" +repository = "https://github.com/ingonyama-zk/icicle" + +[workspace.dependencies] +icicle-core = { path = "icicle-core" } +icicle-cuda-runtime = { path = "icicle-cuda-runtime" } diff --git a/wrappers/rust/icicle-core/Cargo.toml b/wrappers/rust/icicle-core/Cargo.toml index 8aaccccc..2bf9c7f1 100644 --- a/wrappers/rust/icicle-core/Cargo.toml +++ b/wrappers/rust/icicle-core/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "icicle-core" -version = "1.6.0" -edition = "2021" -authors = ["Ingonyama"] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "A library for GPU ZK acceleration by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-cuda-runtime = { path = "../icicle-cuda-runtime" } +icicle-cuda-runtime = { workspace = true } ark-ff = { version = "0.4.0", optional = true } ark-ec = { version = "0.4.0", optional = true, features = ["parallel"] } diff --git a/wrappers/rust/icicle-cuda-runtime/Cargo.toml b/wrappers/rust/icicle-cuda-runtime/Cargo.toml index fd81159e..a0853ef6 100644 --- a/wrappers/rust/icicle-cuda-runtime/Cargo.toml +++ b/wrappers/rust/icicle-cuda-runtime/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-cuda-runtime" -version = "1.6.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Ingonyama's Rust wrapper of CUDA runtime" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true rust-version = "1.70.0" [dependencies] bitflags = "1.3" [build-dependencies] -bindgen = "0.69.4" \ No newline at end of file +bindgen = "0.69.4" diff --git a/wrappers/rust/icicle-curves/icicle-bls12-377/Cargo.toml b/wrappers/rust/icicle-curves/icicle-bls12-377/Cargo.toml index 611c63ee..236ffdc7 100644 --- a/wrappers/rust/icicle-curves/icicle-bls12-377/Cargo.toml +++ b/wrappers/rust/icicle-curves/icicle-bls12-377/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-bls12-377" -version = "1.6.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Rust wrapper for the CUDA implementation of BLS12-377 pairing friendly elliptic curve by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-core = { path = "../../icicle-core" } -icicle-cuda-runtime = { path = "../../icicle-cuda-runtime" } +icicle-core = { workspace = true } +icicle-cuda-runtime = { workspace = true } ark-bls12-377 = { version = "0.4.0", optional = true } [build-dependencies] diff --git a/wrappers/rust/icicle-curves/icicle-bls12-381/Cargo.toml b/wrappers/rust/icicle-curves/icicle-bls12-381/Cargo.toml index 9aeca5a0..5486b0bd 100644 --- a/wrappers/rust/icicle-curves/icicle-bls12-381/Cargo.toml +++ b/wrappers/rust/icicle-curves/icicle-bls12-381/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-bls12-381" -version = "1.6.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Rust wrapper for the CUDA implementation of BLS12-381 pairing friendly elliptic curve by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-core = { path = "../../icicle-core" } -icicle-cuda-runtime = { path = "../../icicle-cuda-runtime" } +icicle-core = { workspace = true } +icicle-cuda-runtime = { workspace = true } ark-bls12-381 = { version = "0.4.0", optional = true } [build-dependencies] diff --git a/wrappers/rust/icicle-curves/icicle-bn254/Cargo.toml b/wrappers/rust/icicle-curves/icicle-bn254/Cargo.toml index 516c0d17..4530abb7 100644 --- a/wrappers/rust/icicle-curves/icicle-bn254/Cargo.toml +++ b/wrappers/rust/icicle-curves/icicle-bn254/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-bn254" -version = "1.6.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Rust wrapper for the CUDA implementation of BN254 pairing friendly elliptic curve by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-core = { path = "../../icicle-core" } -icicle-cuda-runtime = { path = "../../icicle-cuda-runtime" } +icicle-core = { workspace = true } +icicle-cuda-runtime = { workspace = true } ark-bn254 = { version = "0.4.0", optional = true } [build-dependencies] diff --git a/wrappers/rust/icicle-curves/icicle-bw6-761/Cargo.toml b/wrappers/rust/icicle-curves/icicle-bw6-761/Cargo.toml index fd9383a0..f7351e9b 100644 --- a/wrappers/rust/icicle-curves/icicle-bw6-761/Cargo.toml +++ b/wrappers/rust/icicle-curves/icicle-bw6-761/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-bw6-761" -version = "1.6.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Rust wrapper for the CUDA implementation of BW6-761 pairing friendly elliptic curve by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-core = { path = "../../icicle-core" } -icicle-cuda-runtime = { path = "../../icicle-cuda-runtime" } +icicle-core = { workspace = true } +icicle-cuda-runtime = { workspace = true } icicle-bls12-377 = { path = "../../icicle-curves/icicle-bls12-377", features = ["bw6-761"] } ark-bw6-761 = { version = "0.4.0", optional = true } diff --git a/wrappers/rust/icicle-curves/icicle-curve-template/Cargo.toml b/wrappers/rust/icicle-curves/icicle-curve-template/Cargo.toml index 7872e5b0..ba0d6688 100644 --- a/wrappers/rust/icicle-curves/icicle-curve-template/Cargo.toml +++ b/wrappers/rust/icicle-curves/icicle-curve-template/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-" -version = "1.4.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Rust wrapper for the CUDA implementation of elliptic curve by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-core = { path = "../../icicle-core" } -icicle-cuda-runtime = { path = "../../icicle-cuda-runtime" } +icicle-core = { workspace = true } +icicle-cuda-runtime = { workspace = true } ark- = { version = "0.4.0", optional = true } [build-dependencies] diff --git a/wrappers/rust/icicle-curves/icicle-grumpkin/Cargo.toml b/wrappers/rust/icicle-curves/icicle-grumpkin/Cargo.toml index 772a7ef8..dc26326b 100644 --- a/wrappers/rust/icicle-curves/icicle-grumpkin/Cargo.toml +++ b/wrappers/rust/icicle-curves/icicle-grumpkin/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "icicle-grumpkin" -version = "1.6.0" -edition = "2021" -authors = [ "Ingonyama" ] +version.workspace = true +edition.workspace = true +authors.workspace = true description = "Rust wrapper for the CUDA implementation of Grumpkin elliptic curve by Ingonyama" -homepage = "https://www.ingonyama.com" -repository = "https://github.com/ingonyama-zk/icicle" +homepage.workspace = true +repository.workspace = true [dependencies] -icicle-core = { path = "../../icicle-core" } -icicle-cuda-runtime = { path = "../../icicle-cuda-runtime" } +icicle-core = { workspace = true } +icicle-cuda-runtime = { workspace = true } ark-grumpkin-test = { git = "https://github.com/ingonyama-zk/ark-grumpkin-test.git", optional = true} [build-dependencies]