Release flow CI (#423)

## 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
This commit is contained in:
Jeremy Felder
2024-03-06 21:41:48 +02:00
committed by GitHub
parent af6bfc9ab0
commit 9d402df0cf
11 changed files with 102 additions and 69 deletions

34
.github/workflows/release.yml vendored Normal file
View File

@@ -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"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
new_version=$1
if [ -z "$new_version" ]; then
echo "Usage: ./bump_rust_versions.sh <new_version>"
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

View File

@@ -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" }

View File

@@ -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"] }

View File

@@ -1,11 +1,11 @@
[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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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 }

View File

@@ -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]

View File

@@ -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]