Skip to content

Commit

Permalink
feat: succinct 1.79
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Aug 1, 2024
1 parent c689624 commit b150afb
Show file tree
Hide file tree
Showing 14 changed files with 251 additions and 247 deletions.
255 changes: 47 additions & 208 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,218 +1,57 @@
#############################################################
# WARNING: automatically generated file, DO NOT CHANGE! #
#############################################################
name: CI

# 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.
on:
workflow_call:
workflow_dispatch:

---
name: CI
"on":
push:
branches:
- auto
- try
- try-perf
- automation/bors/try
- master
pull_request:
branches:
- "**"
permissions:
contents: read
packages: write
defaults:
run:
shell: bash
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
runs-on: ubuntu-latest
outputs:
jobs: "${{ steps.jobs.outputs.jobs }}"
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- 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 }}"
build:
strategy:
fail-fast: false
matrix:
include: "${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}"
if: "fromJSON(needs.calculate_matrix.outputs.jobs)[0] != null"
defaults:
run:
shell: "${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}"
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
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:
- if: "contains(matrix.os, 'windows')"
uses: msys2/[email protected]
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
msystem: "${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}"
update: false
release: true
path-type: inherit
install: "make dos2unix diffutils\n"
- name: disable git crlf conversion
run: git config --global core.autocrlf false
- name: checkout the source code
uses: actions/checkout@v4
toolchain: stable
- uses: lukka/[email protected]

- name: Show rust version
run: |
cargo version
rustup toolchain list
- name: Check out succinctlabs/rust
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: configure the PR in which the error message will be posted
run: "echo \"[CI_PR_NUMBER=$num]\""
env:
num: "${{ github.event.number }}"
if: "success() && github.event_name == 'pull_request'"
- name: add extra environment variables
run: src/ci/scripts/setup-environment.sh
env:
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
- name: ensure the channel matches the target branch
run: src/ci/scripts/verify-channel.sh
- name: collect CPU statistics
run: src/ci/scripts/collect-cpu-stats.sh
- name: show the current environment
run: src/ci/scripts/dump-environment.sh
- name: install awscli
run: src/ci/scripts/install-awscli.sh
- name: install sccache
run: src/ci/scripts/install-sccache.sh
- name: select Xcode
run: src/ci/scripts/select-xcode.sh
- name: install clang
run: src/ci/scripts/install-clang.sh
- name: install tidy
run: src/ci/scripts/install-tidy.sh
- name: install WIX
run: src/ci/scripts/install-wix.sh
- name: disable git crlf conversion
run: src/ci/scripts/disable-git-crlf-conversion.sh
- name: checkout submodules
run: src/ci/scripts/checkout-submodules.sh
- name: install MSYS2
run: src/ci/scripts/install-msys2.sh
- name: install MinGW
run: src/ci/scripts/install-mingw.sh
- name: install ninja
run: src/ci/scripts/install-ninja.sh
- name: enable ipv6 on Docker
run: src/ci/scripts/enable-docker-ipv6.sh
- name: disable git crlf conversion
run: src/ci/scripts/disable-git-crlf-conversion.sh
- name: ensure line endings are correct
run: src/ci/scripts/verify-line-endings.sh
- name: ensure backported commits are in upstream branches
run: src/ci/scripts/verify-backported-commits.sh
- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh
- name: run the build
run: src/ci/scripts/run-build-from-ci.sh 2>&1
env:
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
- name: create github artifacts
run: src/ci/scripts/create-doc-artifacts.sh
- name: upload artifacts to github
uses: actions/upload-artifact@v4
submodules: "recursive"
path: rust
fetch-depth: 0

- name: Check out succinctlabs/sp1
uses: actions/checkout@v3
with:
name: "${{ env.DOC_ARTIFACT_NAME }}"
path: obj/artifacts/doc
if-no-files-found: ignore
retention-days: 5
- name: upload artifacts to S3
run: src/ci/scripts/upload-artifacts.sh
env:
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
env:
SCCACHE_BUCKET: rust-lang-ci-sccache2
DEPLOY_BUCKET: rust-lang-ci2
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
TOOLSTATE_ISSUES_API_URL: "https://api.github.com/repos/rust-lang/rust/issues"
TOOLSTATE_PUBLISH: 1
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
AWS_REGION: us-west-1
CACHE_DOMAIN: ci-caches.rust-lang.org
if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
steps:
- name: checkout the source code
uses: actions/checkout@v4
repository: succinctlabs/sp1
ref: dev
path: sp1

- name: Build
run: |
cd sp1/cli
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:
fetch-depth: 2
- name: publish toolstate
run: src/ci/publish_toolstate.sh
shell: bash
env:
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
try-success:
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
run: exit 0
shell: bash
name: bors build finished
runs-on: ubuntu-latest
try-failure:
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
run: exit 1
shell: bash
name: bors build finished
runs-on: ubuntu-latest
auto-success:
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
run: exit 0
shell: bash
name: bors build finished
runs-on: ubuntu-latest
auto-failure:
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
run: exit 1
shell: bash
name: bors build finished
runs-on: ubuntu-latest
name: rust-toolchain-${{ matrix.triple }}
path: sp1/cli/rust-toolchain-${{ matrix.triple }}.tar.gz
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release
on:
push:
tags:
- "*"

jobs:
build:
uses: ./.github/workflows/ci.yml

release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: List artifact contents
run: |
echo "Listing artifacts directory:"
ls -R artifacts
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Installing gh CLI..."
curl -L https://github.com/cli/cli/releases/download/v2.17.0/gh_2.17.0_linux_amd64.tar.gz | \
tar xvz --strip-components=2 --exclude=man
chmod +x ./gh
mkdir tars
find artifacts -name "*.tar.gz" -exec mv {} tars/ \;
if [ "$(ls -A tars)" ]; then
./gh release create --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./tars/* || \
./gh release upload --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./tars/*
else
echo "No files to release. Exiting."
exit 1
fi
Loading

0 comments on commit b150afb

Please sign in to comment.