From 917ee48d8dce34e4ac5379d3ba3eb67be07162b3 Mon Sep 17 00:00:00 2001 From: mattstam Date: Tue, 23 Jul 2024 11:19:40 -0700 Subject: [PATCH] same build process --- .github/workflows/ci.yml | 104 ++++++++++++++++++++++++++------------- 1 file changed, 69 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6550eda7f4f..8717b487165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,20 +1,5 @@ -############################################################# -# WARNING: automatically generated file, DO NOT CHANGE! # -############################################################# - -# This file was automatically generated by the expand-yaml-anchors tool. The -# source file that generated this one is: -# -# src/ci/github-actions/ci.yml -# -# Once you make changes to that file you need to run: -# -# ./x.py run src/tools/expand-yaml-anchors/ -# -# The CI build will fail if the tool is not run after changes to this file. - ---- name: CI + on: workflow_call: workflow_dispatch: @@ -28,6 +13,7 @@ defaults: concurrency: group: "${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}" cancel-in-progress: true + jobs: calculate_matrix: name: Calculate job matrix @@ -40,20 +26,12 @@ jobs: - name: Calculate the CI job matrix run: python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT id: jobs + job: name: "${{ matrix.name }}" - needs: - - calculate_matrix - env: - CI_JOB_NAME: "${{ matrix.image }}" - CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse - HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}" - DOCKER_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - SCCACHE_BUCKET: rust-lang-ci-sccache2 - TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate" - CACHE_DOMAIN: ci-caches.rust-lang.org - continue-on-error: "${{ matrix.continue_on_error || false }}" + needs: [calculate_matrix] strategy: + fail-fast: false matrix: include: "${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}" if: "fromJSON(needs.calculate_matrix.outputs.jobs)[0] != null" @@ -145,6 +123,7 @@ jobs: AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}" if: "success() && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')" + master: name: master runs-on: ubuntu-latest @@ -169,9 +148,9 @@ jobs: shell: bash env: TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}" + try-success: - needs: - - job + needs: [job] if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'" steps: - name: mark the job as a success @@ -179,9 +158,9 @@ jobs: shell: bash name: bors build finished runs-on: ubuntu-latest + try-failure: - needs: - - job + needs: [job] if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'" steps: - name: mark the job as a failure @@ -189,9 +168,9 @@ jobs: shell: bash name: bors build finished runs-on: ubuntu-latest + auto-success: - needs: - - job + needs: [job] if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'" steps: - name: mark the job as a success @@ -199,9 +178,9 @@ jobs: shell: bash name: bors build finished runs-on: ubuntu-latest + auto-failure: - needs: - - job + needs: [job] if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'" steps: - name: mark the job as a failure @@ -209,3 +188,58 @@ jobs: shell: bash name: bors build finished runs-on: ubuntu-latest + + build: + strategy: + fail-fast: false + matrix: + include: + - os: macos-14 + triple: aarch64-apple-darwin + - os: macos-13 + triple: x86_64-apple-darwin + - os: buildjet-32vcpu-ubuntu-2004 + triple: x86_64-unknown-linux-gnu + - os: buildjet-32vcpu-ubuntu-2204-arm + triple: aarch64-unknown-linux-gnu + runs-on: ${{ matrix.os }} + steps: + - name: Install nightly toolchain + id: rustc-toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly-2024-01-25 + default: true + + - uses: lukka/get-cmake@v3.27.4 + + - name: Show rust version + run: | + cargo version + rustup toolchain list + + - name: Check out succinctlabs/rust + uses: actions/checkout@v3 + with: + submodules: "recursive" + path: rust + fetch-depth: 0 + + - name: Check out succinctlabs/sp1 + uses: actions/checkout@v3 + with: + repository: succinctlabs/sp1 + ref: dev + path: sp1 + + - name: Build + run: | + cd sp1/cli + pwd + GITHUB_ACTIONS=false SP1_BUILD_DIR=$GITHUB_WORKSPACE cargo run --bin cargo-prove -- prove build-toolchain + + - name: Archive build output + uses: actions/upload-artifact@v3 + with: + name: rust-toolchain-${{ matrix.triple }} + path: sp1/cli/rust-toolchain-${{ matrix.triple }}.tar.gz