forked from risc0/risc0
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (71 loc) · 2.28 KB
/
Copy pathrelease.yml
File metadata and controls
77 lines (71 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
push:
tags:
- "v*.*.*"
# for testing purposes
# pull_request:
# branches: [main, "release-*"]
# this is needed to gain access via OIDC to the S3 bucket for caching
permissions:
id-token: write
contents: write
env:
RISC0_RUST_TOOLCHAIN_VERSION: 1.91.1
RISC0_CPP_TOOLCHAIN_VERSION: 2024.01.05
TAG: v4.0.0
VERSION: 4.0.0
jobs:
release:
runs-on: [self-hosted, cluster, "${{ matrix.os }}", "${{ matrix.arch }}", cpu]
strategy:
fail-fast: false
matrix:
include:
- os: Linux
arch: X64
target: x86_64-unknown-linux-gnu
- os: macOS
arch: ARM64
target: aarch64-apple-darwin
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/actions/rustup
- uses: ./.github/actions/sccache
with:
key: ${{ env.TARGET }}
- if: matrix.os == 'Linux'
run: docker build -f .github/containers/release/Dockerfile --output tmp/pkg .
- if: matrix.os == 'macOS'
run: |
cargo build -p cargo-risczero --release --locked
mkdir -p tmp/pkg
cp target/release/cargo-risczero tmp/pkg
cp target/release/r0vm tmp/pkg
- run: tar cv * | gzip -9 > ../cargo-risczero-$TARGET.tgz
working-directory: tmp/pkg
- uses: svenstaro/upload-release-action@v2
with:
overwrite: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tmp/cargo-risczero-${{ env.TARGET }}.tgz
# tag: ${{ env.TAG }} # only for testing
# wait for recently uploaded release asset to become available,
# otherwise cargo-binstall sometimes errors with 404.
- run: sleep 90
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-binstall
version: "1.10.16"
- run: cargo binstall -y --force cargo-risczero@${{ env.VERSION }}
- run: cargo run --bin rzup -- --verbose install rust $RISC0_RUST_TOOLCHAIN_VERSION
- run: cargo run --bin rzup -- --verbose install cpp $RISC0_CPP_TOOLCHAIN_VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo run
working-directory: tools/smoke-test