Skip to content

Commit

Permalink
Release flow CI (#423)
Browse files Browse the repository at this point in the history
## Describe the changes

This PR:
- Moves common crate attributes to the workspace Cargo.toml. 
- Adds a manual release flow for bumping, tagging, and draft release
  • Loading branch information
jeremyfelder authored Mar 6, 2024
1 parent af6bfc9 commit 9d402df
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 69 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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"
15 changes: 0 additions & 15 deletions scripts/bump_rust_versions.sh

This file was deleted.

14 changes: 14 additions & 0 deletions wrappers/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
12 changes: 6 additions & 6 deletions wrappers/rust/icicle-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"] }
Expand Down
12 changes: 6 additions & 6 deletions wrappers/rust/icicle-cuda-runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
bindgen = "0.69.4"
14 changes: 7 additions & 7 deletions wrappers/rust/icicle-curves/icicle-bls12-377/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
14 changes: 7 additions & 7 deletions wrappers/rust/icicle-curves/icicle-bls12-381/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
14 changes: 7 additions & 7 deletions wrappers/rust/icicle-curves/icicle-bn254/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
14 changes: 7 additions & 7 deletions wrappers/rust/icicle-curves/icicle-bw6-761/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 }

Expand Down
14 changes: 7 additions & 7 deletions wrappers/rust/icicle-curves/icicle-curve-template/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "icicle-<CURVE>"
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 <CURVE> 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-<CURVE> = { version = "0.4.0", optional = true }

[build-dependencies]
Expand Down
14 changes: 7 additions & 7 deletions wrappers/rust/icicle-curves/icicle-grumpkin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 9d402df

Please sign in to comment.