feat: use github access token to clone rust #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | ||
on: | ||
push: | ||
branches: [ succinct ] | ||
pull_request: | ||
branches: [ succinct ] | ||
workflow_call: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# include: | ||
# - os: macOS | ||
# arch: ARM64 | ||
# triple: aarch64-apple-darwin | ||
# - os: macOS | ||
# arch: X64 | ||
# triple: x86_64-apple-darwin | ||
# - os: Linux | ||
# arch: X64 | ||
# triple: x86_64-unknown-linux-gnu | ||
# runs-on: [buildjet-32vcpu-ubuntu-2204, "${{ matrix.os }}", "${{ matrix.arch }}"] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- 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: Check out succinctlabs/rust | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
path: rust | ||
ref: succinct | ||
fetch-depth: 0 | ||
- 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: Build | ||
run: GITHUB_ACCESS_TOKEN=${{ secrets.PRIVATE_PULL_TOKEN }} cargo run --bin cargo-prove -- prove build-toolchain | ||
working-directory: vm | ||
- name: Archive build output | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: rust-toolchain-ubuntu | ||
path: | | ||
rust/build/${{ matrix.triple }}/stage2 | ||
!rust/build/${{ matrix.triple }}/stage2/lib/rustlib/src | ||
!rust/build/${{ matrix.triple }}/stage2/lib/rustlib/rustc-src |