Skip to content

Commit

Permalink
Add release workflow (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaub committed Oct 7, 2023
1 parent b663dc5 commit c9f6be1
Show file tree
Hide file tree
Showing 28 changed files with 272 additions and 190 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release

on:
push:
tags:
- "v*.*.*"
# for testing purposes
# pull_request:
# branches: [ main ]
# workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true

build:
runs-on: [self-hosted, prod, "${{ matrix.os }}", "${{ matrix.device }}"]
needs: release
strategy:
fail-fast: false
matrix:
include:
- os: Linux
feature: cuda
device: nvidia_rtx_a5000
target: x86_64-unknown-linux-gnu
- os: macOS
feature: metal
device: apple_m2_pro
target: aarch64-apple-darwin
env:
CUDA_LIBRARY_PATH: /usr/lib/cuda
FEATURE: ${{ matrix.feature }}
RUSTC_WRAPPER: sccache
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rustup
- uses: ./.github/actions/sccache
with:
key: ${{ matrix.os }}-${{ matrix.feature }}
- run: cargo build -p cargo-risczero --release -F $FEATURE
- run: |
mkdir -p tmp/pkg
cp target/release/cargo-risczero tmp/pkg
cp target/release/r0vm tmp/pkg
cd tmp/pkg && tar cv * | gzip -9 > ../cargo-risczero-$TARGET.tgz
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tmp/cargo-risczero-${{ matrix.target }}.tgz

publish:
runs-on: [self-hosted, prod, Linux, cpu]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rustup
- name: Install cargo-release
uses: risc0/cargo-install@2cfb0024938d23011106cbf127b393bc83fddba1
with:
crate: cargo-release
version: "0.24"
- run: cargo release publish --no-confirm --execute
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ members = [
exclude = ["tools/crates-validator"]

[workspace.package]
version = "0.18.0"
version = "0.19.0-alpha.1"
edition = "2021"
license = "Apache-2.0"
homepage = "https://risczero.com/"
Expand All @@ -33,18 +33,18 @@ repository = "https://github.com/risc0/risc0/"
bonsai-ethereum-contracts = { version = "0.1.0", path = "bonsai/ethereum" }
bonsai-ethereum-relay = { version = "0.1.0", default-features = false, path = "bonsai/ethereum-relay" }
bonsai-rest-api-mock = { version = "0.1.0", default-features = false, path = "bonsai/rest-api-mock" }
bonsai-sdk = { version = "0.4.0", default-features = false, path = "bonsai/sdk" }
risc0-binfmt = { version = "0.18.0", default-features = false, path = "risc0/binfmt" }
risc0-build = { version = "0.18.0", default-features = false, path = "risc0/build" }
risc0-build-kernel = { version = "0.18.0", default-features = false, path = "risc0/build_kernel" }
risc0-circuit-rv32im = { version = "0.18.0", default-features = false, path = "risc0/circuit/rv32im" }
risc0-circuit-rv32im-sys = { version = "0.18.0", default-features = false, path = "risc0/circuit/rv32im-sys" }
risc0-core = { version = "0.18.0", default-features = false, path = "risc0/core" }
risc0-r0vm = { version = "0.18.0", default-features = false, path = "risc0/r0vm" }
risc0-sys = { version = "0.18.0", default-features = false, path = "risc0/sys" }
risc0-zkp = { version = "0.18.0", default-features = false, path = "risc0/zkp" }
risc0-zkvm = { version = "0.18.0", default-features = false, path = "risc0/zkvm" }
risc0-zkvm-platform = { version = "0.18.0", default-features = false, path = "risc0/zkvm/platform" }
bonsai-sdk = { version = "0.5.0-alpha.1", default-features = false, path = "bonsai/sdk" }
risc0-binfmt = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/binfmt" }
risc0-build = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/build" }
risc0-build-kernel = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/build_kernel" }
risc0-circuit-rv32im = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/circuit/rv32im" }
risc0-circuit-rv32im-sys = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/circuit/rv32im-sys" }
risc0-core = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/core" }
risc0-r0vm = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/r0vm" }
risc0-sys = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/sys" }
risc0-zkp = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/zkp" }
risc0-zkvm = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/zkvm" }
risc0-zkvm-platform = { version = "0.19.0-alpha.1", default-features = false, path = "risc0/zkvm/platform" }

[profile.bench]
lto = true
Expand Down
24 changes: 12 additions & 12 deletions bonsai/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions bonsai/examples/governance/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions bonsai/examples/governance/methods/guest/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bonsai/sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bonsai-sdk"
description = "Bonsai Software Development Kit"
version = "0.4.0"
version = "0.5.0-alpha.1"
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
Expand Down

0 comments on commit c9f6be1

Please sign in to comment.