Skip to content

CI

CI #45

Workflow file for this run

name: CI
on:
push:
branches: [ risc0 ]
pull_request:
branches: [ risc0 ]
workflow_call:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macOS
arch: ARM64
triple: aarch64-apple-darwin
- os: Linux
arch: X64
triple: x86_64-unknown-linux-gnu
runs-on: [ self-hosted, release, "${{ matrix.os }}", "${{ matrix.arch }}" ]
steps:
- name: Install Rust
uses: risc0/actions-rs-toolchain@v1
with:
toolchain: stable
- uses: lukka/get-cmake@v3.27.4
- 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 toolchain"
run: |
tar \
--exclude lib/rustlib/src \
--exclude lib/rustlib/rustc-src \
-hczvf \
./rust-toolchain-${{ matrix.triple }}.tar.gz \
-C ./build/${{ matrix.triple }}/stage2/ \
.
working-directory: rust
- name: "Upload workflow artifact"
uses: "actions/upload-artifact@v4"
with:
name: "rust-toolchain-${{ matrix.triple }}.tar.gz"
path: "rust/rust-toolchain-${{ matrix.triple }}.tar.gz"
# wait for recently uploaded release asset to become available,
# otherwise cargo-binstall sometimes errors with 404.
- name: Wait for upload
run: sleep 90
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Display structure of downloaded artifacts
run: ls -R ./artifacts