-
Notifications
You must be signed in to change notification settings - Fork 339
69 lines (64 loc) · 2.01 KB
/
release.yml
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
name: Release
on:
push:
tags:
- "v*.*.*"
# for testing purposes
# pull_request:
# branches: [main, "release-*"]
env:
RISC0_TOOLCHAIN_VERSION: test-release-2
TAG: v0.19.1
VERSION: "0.19.1"
jobs:
release:
runs-on: [self-hosted, prod, "${{ matrix.os }}", cpu]
strategy:
fail-fast: false
matrix:
include:
- os: Linux
target: x86_64-unknown-linux-gnu
- os: macOS
target: aarch64-apple-darwin
env:
RUSTC_WRAPPER: sccache
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs checkout
- 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
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: risc0/cargo-install@2cfb0024938d23011106cbf127b393bc83fddba1
with:
crate: cargo-binstall
version: "1.4"
- run: cargo binstall -y --force cargo-risczero@${{ env.VERSION }}
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo run
working-directory: tools/smoke-test