Skip to content

Commit

Permalink
feat: use 1.79 toolchain (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam authored Aug 2, 2024
1 parent b28b4a9 commit 631a463
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ runs:
~/.cargo/git/db/
target/
~/.rustup/
key: rust-nightly-2024-04-17-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-nightly-2024-04-17-
key: rust-1.79.0-${{ hashFiles('**/Cargo.toml') }}
restore-keys: rust-1.79.0-

- name: Setup toolchain
id: rustc-toolchain
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly-2024-04-17 -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.79.0 -y
10 changes: 8 additions & 2 deletions .github/workflows/docker-gnark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ on:
jobs:
test-docker:
name: Test
runs-on: [runs-on,runner=64cpu-linux-arm64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
runner=64cpu-linux-arm64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -35,5 +41,5 @@ jobs:
SP1_GNARK_IMAGE: sp1-gnark
with:
command: test
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --release -p sp1-prover -- --exact tests::test_e2e
46 changes: 39 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ concurrency:
jobs:
plonk:
name: Plonk Native
runs-on: [runs-on,cpu=64,ram=256,family=m7i+m7a,hdd=80,image=ubuntu22-full-x64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
cpu=64,
ram=256,
family=m7i+m7a,
hdd=80,
image=ubuntu22-full-x64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -34,15 +44,25 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --release -p sp1-sdk --features native-gnark -- test_e2e_prove_plonk --nocapture
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
RUST_BACKTRACE: 1

plonk-docker:
name: Plonk Docker
runs-on: [runs-on,cpu=64,ram=256,family=m7i+m7a,hdd=80,image=ubuntu22-full-x64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
cpu=64,
ram=256,
family=m7i+m7a,
hdd=80,
image=ubuntu22-full-x64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -56,15 +76,15 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --release -p sp1-sdk -- test_e2e_prove_plonk --nocapture
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
RUST_BACKTRACE: 1

check-branch:
name: Check branch
runs-on: [ubuntu-latest,"run-id=${{ github.run_id }}"]
runs-on: [ubuntu-latest, "run-id=${{ github.run_id }}"]
steps:
- name: Check branch
if: github.head_ref != 'dev' && !startsWith(github.head_ref, 'release/') && !startsWith(github.head_ref, 'hotfix/')
Expand All @@ -74,7 +94,13 @@ jobs:
ssz-withdrawals:
name: Example (SSZ Withdrawals)
runs-on: [runs-on,runner=64cpu-linux-arm64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
runner=64cpu-linux-arm64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand Down Expand Up @@ -108,7 +134,13 @@ jobs:
tendermint:
name: Example (Tendermint)
runs-on: [runs-on,runner=64cpu-linux-arm64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
runner=64cpu-linux-arm64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ concurrency:
jobs:
test-x86:
name: Test (x86-64)
runs-on: [runs-on,runner=64cpu-linux-x64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
runner=64cpu-linux-x64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -41,14 +47,14 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --all-targets --all-features

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --release --features native-gnark
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
Expand All @@ -58,7 +64,13 @@ jobs:

test-arm:
name: Test (ARM)
runs-on: [runs-on,runner=64cpu-linux-arm64,spot=false,"run-id=${{ github.run_id }}"]
runs-on:
[
runs-on,
runner=64cpu-linux-arm64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand All @@ -72,14 +84,14 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --all-targets --all-features

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
toolchain: nightly-2024-04-17
toolchain: 1.79.0
args: --release --features native-gnark
env:
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
Expand All @@ -89,7 +101,7 @@ jobs:

lint:
name: Formatting & Clippy
runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand Down Expand Up @@ -117,7 +129,7 @@ jobs:

examples:
name: Examples
runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand Down Expand Up @@ -147,7 +159,7 @@ jobs:
cli:
name: CLI
runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
prepare:
name: Prepare release
runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"]
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
timeout-minutes: 30
outputs:
tag_name: ${{ steps.release_info.outputs.tag_name }}
Expand All @@ -32,7 +32,7 @@ jobs:
with:
pull_token: ${{ secrets.PULL_TOKEN }}

# If it's a nightly release, tag with the release time. If the tag is `main`, we want to use
# If it's a nightly release, tag with the release time. If the tag is `main`, we want to use
# `latest` as the tag name. Else, use the tag name as is.
- name: Compute release name and tag
id: release_info
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
id: rustc-toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-17
toolchain: 1.79.0
profile: minimal
override: true
targets: ${{ matrix.target }}
Expand All @@ -126,12 +126,12 @@ jobs:
with:
key: ${{ matrix.target }}
cache-on-failure: true

- name: Install go
uses: actions/setup-go@v5
with:
go-version: '^1.22.1'
go-version: "^1.22.1"

- name: Check go installation
run: |
go version
Expand Down Expand Up @@ -265,4 +265,4 @@ jobs:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md
filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md
2 changes: 1 addition & 1 deletion book/developers/usage-in-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You first need have Rust installed, and you can use
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-17
toolchain: 1.79.0
profile: default
override: true
default: true
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-04-17"
components = ["llvm-tools", "rustc-dev"]
channel = "1.79.0"
components = ["llvm-tools", "rustc-dev"]

0 comments on commit 631a463

Please sign in to comment.