Skip to content

Release

Release #28

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
# jobs:
# build-ubuntu:
# runs-on: [buildjet-32vcpu-ubuntu-2204]
# steps:
# - name: Set up git private repo access
# run: |
# git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}@github.com".insteadOf ssh://[email protected]
# - name: Install Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - name: Install ninja and cmake
# uses: lukka/[email protected]
# - name: Check out succinctlabs/vm
# uses: actions/checkout@v3
# with:
# repository: succinctlabs/vm
# path: vm
# ref: john/cargo-succinct-build-toolchain
# token: ${{ secrets.PRIVATE_PULL_TOKEN }}
# - name: Install cargo prove
# run: cargo install --locked --path .
# working-directory: vm/cli
# - name: Build toolchain
# run: GITHUB_ACTIONS=false GITHUB_ACCESS_TOKEN=${{ secrets.PRIVATE_PULL_TOKEN }} cargo prove build-toolchain
# - name: Archive build output
# uses: actions/upload-artifact@v3
# with:
# name: rust-toolchain-x86_64-unknown-linux-gnu
# path: |
# rust/build/x86_64-unknown-linux-gnu/stage2
# !rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/src
# !rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src
# build-macos-x86:
# runs-on: [macos-latest-large]
# steps:
# - name: Set up git private repo access
# run: |
# git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}@github.com".insteadOf ssh://[email protected]
# - name: Install Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - name: Install ninja and cmake
# uses: lukka/[email protected]
# - name: Check out succinctlabs/vm
# uses: actions/checkout@v3
# with:
# repository: succinctlabs/vm
# path: vm
# ref: john/cargo-succinct-build-toolchain
# token: ${{ secrets.PRIVATE_PULL_TOKEN }}
# - name: Install cargo prove
# run: cargo install --locked --path .
# working-directory: vm/cli
# - name: Build toolchain
# run: GITHUB_ACTIONS=false GITHUB_ACCESS_TOKEN=${{ secrets.PRIVATE_PULL_TOKEN }} cargo prove build-toolchain
# - name: Archive build output
# uses: actions/upload-artifact@v3
# with:
# name: rust-toolchain-x86_64-apple-darwin
# path: |
# rust/build/x86_64-apple-darwin/stage2
# !rust/build/x86_64-apple-darwin/stage2/lib/rustlib/src
# !rust/build/x86_64-apple-darwin/stage2/lib/rustlib/rustc-src
# build-macos-arm64:
# runs-on: [macos-latest-xlarge]
# steps:
# - name: Set up git private repo access
# run: |
# git config --global url."https://${{ secrets.PRIVATE_PULL_TOKEN }}@github.com".insteadOf ssh://[email protected]
# - name: Install Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - name: Install ninja and cmake
# uses: lukka/[email protected]
# - name: Check out succinctlabs/vm
# uses: actions/checkout@v3
# with:
# repository: succinctlabs/vm
# path: vm
# ref: john/cargo-succinct-build-toolchain
# token: ${{ secrets.PRIVATE_PULL_TOKEN }}
# - name: Install cargo prove
# run: cargo install --locked --path .
# working-directory: vm/cli
# - name: Build toolchain
# run: GITHUB_ACTIONS=false GITHUB_ACCESS_TOKEN=${{ secrets.PRIVATE_PULL_TOKEN }} cargo prove build-toolchain
# - name: Archive build output
# uses: actions/upload-artifact@v3
# with:
# name: rust-toolchain-aarch64-apple-darwin
# path: |
# rust/build/aarch64-apple-darwin/stage2
# !rust/build/aarch64-apple-darwin/stage2/lib/rustlib/src
# !rust/build/aarch64-apple-darwin/stage2/lib/rustlib/rustc-src
# release:
# needs: [build-ubuntu, build-macos-x86, build-macos-arm64]
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# path: artifacts
# - name: Compress artifacts
# shell: bash
# run: |
# ls -lha ./artifacts
# mkdir assets
# for DIR in $(ls ./artifacts); do
# tar czf "assets/$DIR.tar.gz" -C "artifacts/$DIR" .
# done
# ls -lha ./assets
# - name: Create release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# echo "Installing gh CLI..."
# curl -L https://github.com/cli/cli/releases/download/v2.17.0/gh_2.17.0_linux_amd64.tar.gz | \
# tar xvz --strip-components=2 --exclude=man
# chmod +x ./gh
# ./gh release create --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./assets/* || \
# ./gh release upload --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./assets/*
jobs:
build:
runs-on: [macos-latest-xlarge]
steps:
- name: Install Rust
uses: risc0/actions-rs-toolchain@v1
with:
toolchain: stable
- name: Check out risc0/rust
uses: actions/checkout@v3
with:
submodules: 'recursive'
path: rust
fetch-depth: 0
- name: Check out risc0/risc0
uses: actions/checkout@v3
with:
repository: risc0/risc0
ref: main
path: risc0
- name: Build
run: GITHUB_ACTIONS=false RISC0_BUILD_DIR=$GITHUB_WORKSPACE cargo run --bin cargo-risczero -- risczero build-toolchain
working-directory: risc0
- name: Archive build output
uses: actions/upload-artifact@v3
with:
name: rust-toolchain-aarch64-apple-darwin
path: |
rust/build/aarch64-apple-darwin/stage2
!rust/build/aarch64-apple-darwin/stage2/lib/rustlib/src
!rust/build/aarch64-apple-darwin/stage2/lib/rustlib/rustc-src
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Compress artifacts
shell: bash
run: |
ls -lha ./artifacts
mkdir assets
for DIR in $(ls ./artifacts); do
tar czf "assets/$DIR.tar.gz" -C "artifacts/$DIR" .
done
ls -lha ./assets
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Installing gh CLI..."
curl -L https://github.com/cli/cli/releases/download/v2.17.0/gh_2.17.0_linux_amd64.tar.gz | tar xvz --strip-components=2 --exclude=man
chmod +x ./gh
./gh release create --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./assets/*