Skip to content

Commit 3d6adaa

Browse files
committed
succinct 1.82.0
1 parent f6e511e commit 3d6adaa

File tree

12 files changed

+125
-279
lines changed

12 files changed

+125
-279
lines changed

Diff for: .github/workflows/ci.yml

+42-224
Original file line numberDiff line numberDiff line change
@@ -1,240 +1,58 @@
1-
# This file defines our primary CI workflow that runs on pull requests
2-
# and also on pushes to special branches (auto, try).
3-
#
4-
# The actual definition of the executed jobs is calculated by a Python
5-
# script located at src/ci/github-actions/calculate-job-matrix.py, which
6-
# uses job definition data from src/ci/github-actions/jobs.yml.
7-
# You should primarily modify the `jobs.yml` file if you want to modify
8-
# what jobs are executed in CI.
9-
101
name: CI
11-
on:
12-
push:
13-
branches:
14-
- auto
15-
- try
16-
- try-perf
17-
- automation/bors/try
18-
pull_request:
19-
branches:
20-
- "**"
212

22-
permissions:
23-
contents: read
24-
packages: write
25-
26-
defaults:
27-
run:
28-
# On Linux, macOS, and Windows, use the system-provided bash as the default
29-
# shell. (This should only make a difference on Windows, where the default
30-
# shell is PowerShell.)
31-
shell: bash
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
326

33-
concurrency:
34-
# For a given workflow, if we push to the same branch, cancel all previous builds on that branch.
35-
# We add an exception for try builds (try branch) and unrolled rollup builds (try-perf), which
36-
# are all triggered on the same branch, but which should be able to run concurrently.
37-
group: ${{ github.workflow }}-${{ ((github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.sha) || github.ref }}
38-
cancel-in-progress: true
39-
env:
40-
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
41-
# This will be empty in PR jobs.
42-
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
437
jobs:
44-
# The job matrix for `calculate_matrix` is defined in src/ci/github-actions/jobs.yml.
45-
# It calculates which jobs should be executed, based on the data of the ${{ github }} context.
46-
# If you want to modify CI jobs, take a look at src/ci/github-actions/jobs.yml.
47-
calculate_matrix:
48-
name: Calculate job matrix
49-
runs-on: ubuntu-latest
50-
outputs:
51-
jobs: ${{ steps.jobs.outputs.jobs }}
52-
run_type: ${{ steps.jobs.outputs.run_type }}
53-
steps:
54-
- name: Checkout the source code
55-
uses: actions/checkout@v4
56-
- name: Calculate the CI job matrix
57-
env:
58-
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
59-
run: python3 src/ci/github-actions/calculate-job-matrix.py >> $GITHUB_OUTPUT
60-
id: jobs
61-
job:
62-
name: ${{ matrix.name }}
63-
needs: [ calculate_matrix ]
64-
runs-on: "${{ matrix.os }}"
65-
defaults:
66-
run:
67-
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
68-
timeout-minutes: 240
69-
env:
70-
CI_JOB_NAME: ${{ matrix.image }}
71-
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
72-
# commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs.
73-
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
74-
DOCKER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
SCCACHE_BUCKET: rust-lang-ci-sccache2
76-
CACHE_DOMAIN: ci-caches.rust-lang.org
77-
continue-on-error: ${{ matrix.continue_on_error || false }}
8+
build:
789
strategy:
10+
fail-fast: false
7911
matrix:
80-
# Check the `calculate_matrix` job to see how is the matrix defined.
81-
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
12+
include:
13+
- os: macos-14
14+
triple: aarch64-apple-darwin
15+
- os: macos-13
16+
triple: x86_64-apple-darwin
17+
- os: buildjet-32vcpu-ubuntu-2204
18+
triple: x86_64-unknown-linux-gnu
19+
- os: buildjet-32vcpu-ubuntu-2204-arm
20+
triple: aarch64-unknown-linux-gnu
21+
runs-on: ${{ matrix.os }}
8222
steps:
83-
- if: contains(matrix.os, 'windows')
84-
uses: msys2/[email protected]
23+
- name: Install Rust
24+
uses: actions-rs/toolchain@v1
8525
with:
86-
# i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
87-
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
88-
# don't try to download updates for already installed packages
89-
update: false
90-
# don't try to use the msys that comes built-in to the github runner,
91-
# so we can control what is installed (i.e. not python)
92-
release: true
93-
# Inherit the full path from the Windows environment, with MSYS2's */bin/
94-
# dirs placed in front. This lets us run Windows-native Python etc.
95-
path-type: inherit
96-
install: >
97-
make
26+
toolchain: stable
27+
- uses: lukka/[email protected]
9828

99-
- name: disable git crlf conversion
100-
run: git config --global core.autocrlf false
29+
- name: Show rust version
30+
run: |
31+
cargo version
32+
rustup toolchain list
10133
102-
- name: checkout the source code
103-
uses: actions/checkout@v4
34+
- name: Check out succinctlabs/rust
35+
uses: actions/checkout@v3
10436
with:
105-
fetch-depth: 2
106-
107-
# Rust Log Analyzer can't currently detect the PR number of a GitHub
108-
# Actions build on its own, so a hint in the log message is needed to
109-
# point it in the right direction.
110-
- name: configure the PR in which the error message will be posted
111-
run: echo "[CI_PR_NUMBER=$num]"
112-
env:
113-
num: ${{ github.event.number }}
114-
if: needs.calculate_matrix.outputs.run_type == 'pr'
115-
116-
- name: add extra environment variables
117-
run: src/ci/scripts/setup-environment.sh
118-
env:
119-
# Since it's not possible to merge `${{ matrix.env }}` with the other
120-
# variables in `job.<name>.env`, the variables defined in the matrix
121-
# are passed to the `setup-environment.sh` script encoded in JSON,
122-
# which then uses log commands to actually set them.
123-
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
124-
125-
- name: ensure the channel matches the target branch
126-
run: src/ci/scripts/verify-channel.sh
127-
128-
- name: collect CPU statistics
129-
run: src/ci/scripts/collect-cpu-stats.sh
130-
131-
- name: show the current environment
132-
run: src/ci/scripts/dump-environment.sh
133-
134-
- name: install awscli
135-
run: src/ci/scripts/install-awscli.sh
136-
137-
- name: install sccache
138-
run: src/ci/scripts/install-sccache.sh
139-
140-
- name: select Xcode
141-
run: src/ci/scripts/select-xcode.sh
142-
143-
- name: install clang
144-
run: src/ci/scripts/install-clang.sh
37+
submodules: "recursive"
38+
path: rust
39+
fetch-depth: 0
40+
ref: ${{ github.ref }}
14541

146-
- name: install tidy
147-
run: src/ci/scripts/install-tidy.sh
148-
149-
- name: install WIX
150-
run: src/ci/scripts/install-wix.sh
151-
152-
- name: disable git crlf conversion
153-
run: src/ci/scripts/disable-git-crlf-conversion.sh
154-
155-
- name: checkout submodules
156-
run: src/ci/scripts/checkout-submodules.sh
157-
158-
- name: install MinGW
159-
run: src/ci/scripts/install-mingw.sh
160-
161-
- name: install ninja
162-
run: src/ci/scripts/install-ninja.sh
163-
164-
- name: enable ipv6 on Docker
165-
run: src/ci/scripts/enable-docker-ipv6.sh
166-
167-
# Disable automatic line ending conversion (again). On Windows, when we're
168-
# installing dependencies, something switches the git configuration directory or
169-
# re-enables autocrlf. We've not tracked down the exact cause -- and there may
170-
# be multiple -- but this should ensure submodules are checked out with the
171-
# appropriate line endings.
172-
- name: disable git crlf conversion
173-
run: src/ci/scripts/disable-git-crlf-conversion.sh
174-
175-
- name: ensure line endings are correct
176-
run: src/ci/scripts/verify-line-endings.sh
177-
178-
- name: ensure backported commits are in upstream branches
179-
run: src/ci/scripts/verify-backported-commits.sh
180-
181-
- name: ensure the stable version number is correct
182-
run: src/ci/scripts/verify-stable-version-number.sh
183-
184-
- name: run the build
185-
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
186-
run: src/ci/scripts/run-build-from-ci.sh 2>&1
187-
env:
188-
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
189-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
190-
191-
- name: create github artifacts
192-
run: src/ci/scripts/create-doc-artifacts.sh
193-
194-
- name: upload artifacts to github
195-
uses: actions/upload-artifact@v4
42+
- name: Check out succinctlabs/sp1
43+
uses: actions/checkout@v3
19644
with:
197-
# name is set in previous step
198-
name: ${{ env.DOC_ARTIFACT_NAME }}
199-
path: obj/artifacts/doc
200-
if-no-files-found: ignore
201-
retention-days: 5
45+
repository: succinctlabs/sp1
46+
ref: main
47+
path: sp1
20248

203-
- name: upload artifacts to S3
204-
run: src/ci/scripts/upload-artifacts.sh
205-
env:
206-
AWS_ACCESS_KEY_ID: ${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}
207-
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}
208-
# Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
209-
# builders *should* have the AWS credentials available. Still, explicitly
210-
# adding the condition is helpful as this way CI will not silently skip
211-
# deploying artifacts from a dist builder if the variables are misconfigured,
212-
# erroring about invalid credentials instead.
213-
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
49+
- name: Build
50+
run: |
51+
cd sp1/crates/cli
52+
GITHUB_ACTIONS=false SP1_BUILD_DIR=$GITHUB_WORKSPACE cargo run --bin cargo-prove -- prove build-toolchain
21453
215-
# This job isused to tell bors the final status of the build, as there is no practical way to detect
216-
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
217-
outcome:
218-
name: bors build finished
219-
runs-on: ubuntu-latest
220-
needs: [ calculate_matrix, job ]
221-
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
222-
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
223-
steps:
224-
- name: checkout the source code
225-
uses: actions/checkout@v4
54+
- name: Archive build output
55+
uses: actions/upload-artifact@v3
22656
with:
227-
fetch-depth: 2
228-
# Calculate the exit status of the whole CI workflow.
229-
# If all dependent jobs were successful, this exits with 0 (and the outcome job continues successfully).
230-
# If a some dependent job has failed, this exits with 1.
231-
- name: calculate the correct exit status
232-
run: jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
233-
# Publish the toolstate if an auto build succeeds (just before push to master)
234-
- name: publish toolstate
235-
run: src/ci/publish_toolstate.sh
236-
shell: bash
237-
if: needs.calculate_matrix.outputs.run_type == 'auto'
238-
env:
239-
TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues
240-
TOOLSTATE_PUBLISH: 1
57+
name: rust-toolchain-${{ matrix.triple }}
58+
path: sp1/crates/cli/rust-toolchain-${{ matrix.triple }}.tar.gz

Diff for: .github/workflows/release.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
jobs:
7+
build:
8+
uses: ./.github/workflows/ci.yml
9+
release:
10+
needs: build
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Download artifacts
16+
uses: actions/download-artifact@v3
17+
with:
18+
path: artifacts
19+
- name: List artifact contents
20+
run: |
21+
echo "Listing artifacts directory:"
22+
ls -R artifacts
23+
- name: Create release
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
echo "Installing gh CLI..."
28+
curl -L https://github.com/cli/cli/releases/download/v2.17.0/gh_2.17.0_linux_amd64.tar.gz | \
29+
tar xvz --strip-components=2 --exclude=man
30+
chmod +x ./gh
31+
mkdir tars
32+
find artifacts -name "*.tar.gz" -exec mv {} tars/ \;
33+
if [ "$(ls -A tars)" ]; then
34+
./gh release create --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./tars/* || \
35+
./gh release upload --repo "$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" ./tars/*
36+
else
37+
echo "No files to release. Exiting."
38+
exit 1
39+
fi

Diff for: compiler/rustc_target/src/spec/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use std::{fmt, io};
4545
use rustc_fs_util::try_canonicalize;
4646
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
4747
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
48-
use rustc_span::symbol::{kw, sym, Symbol};
48+
use rustc_span::symbol::{Symbol, kw, sym};
4949
use serde_json::Value;
5050
use tracing::debug;
5151

@@ -1754,7 +1754,7 @@ supported_targets! {
17541754
("aarch64-unknown-trusty", aarch64_unknown_trusty),
17551755

17561756
("riscv32i-unknown-none-elf", riscv32i_unknown_none_elf),
1757-
("riscv32im-risc0-zkvm-elf", riscv32im_risc0_zkvm_elf),
1757+
("riscv32im-succinct-zkvm-elf", riscv32im_succinct_zkvm_elf),
17581758
("riscv32im-unknown-none-elf", riscv32im_unknown_none_elf),
17591759
("riscv32ima-unknown-none-elf", riscv32ima_unknown_none_elf),
17601760
("riscv32imc-unknown-none-elf", riscv32imc_unknown_none_elf),
@@ -3328,10 +3328,10 @@ impl Target {
33283328

33293329
// Each field should have been read using `Json::remove` so any keys remaining are unused.
33303330
let remaining_keys = obj.keys();
3331-
Ok((
3332-
base,
3333-
TargetWarnings { unused_fields: remaining_keys.cloned().collect(), incorrect_type },
3334-
))
3331+
Ok((base, TargetWarnings {
3332+
unused_fields: remaining_keys.cloned().collect(),
3333+
incorrect_type,
3334+
}))
33353335
}
33363336

33373337
/// Load a built-in target

Diff for: compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs renamed to compiler/rustc_target/src/spec/targets/riscv32im_risc0_succinct_elf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn target() -> Target {
1515

1616
options: TargetOptions {
1717
os: "zkvm".into(),
18-
vendor: "risc0".into(),
18+
vendor: "succinct".into(),
1919
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
2020
linker: Some("rust-lld".into()),
2121
cpu: "generic-rv32".into(),

Diff for: library/std/src/sys/pal/zkvm/abi.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//! ABI definitions for symbols exported by risc0-zkvm-platform.
1+
//! ABI definitions for symbols exported by sp1-zkvm.
22
3-
// Included here so we don't have to depend on risc0-zkvm-platform.
3+
// Included here so we don't have to depend on sp1-zkvm.
44
//
55
// FIXME: Should we move this to the "libc" crate? It seems like other
66
// architectures put a lot of this kind of stuff there. But there's
7-
// currently no risc0 fork of the libc crate, so we'd either have to
7+
// currently no succinct fork of the libc crate, so we'd either have to
88
// fork it or upstream it.
99

1010
#![allow(dead_code)]
@@ -19,7 +19,7 @@ pub mod fileno {
1919
}
2020

2121
extern "C" {
22-
// Wrappers around syscalls provided by risc0-zkvm-platform:
22+
// Wrappers around syscalls provided by sp1-zkvm-platform:
2323
pub fn sys_halt();
2424
pub fn sys_output(output_id: u32, output_value: u32);
2525
pub fn sys_sha_compress(
@@ -34,7 +34,7 @@ extern "C" {
3434
buf: *const u8,
3535
count: u32,
3636
);
37-
pub fn sys_rand(recv_buf: *mut u32, words: usize);
37+
pub fn sys_rand(recv_buf: *mut u8, words: usize);
3838
pub fn sys_panic(msg_ptr: *const u8, len: usize) -> !;
3939
pub fn sys_log(msg_ptr: *const u8, len: usize);
4040
pub fn sys_cycle_count() -> usize;

0 commit comments

Comments
 (0)