Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 2 additions & 29 deletions .github/workflows/_build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@ on:
description: "Include CairoLS in build"
type: boolean
default: true
include-stwo:
description: "Include Stwo in build"
type: boolean
default: true
include-lint:
description: "Include CairoLint in build"
type: boolean
default: true

env:
# TODO(#1915): Use stable toolchain once stwo is stable.
RUST_NIGHTLY_TOOLCHAIN: "nightly-2025-07-14"

jobs:
build:
name: build ${{ matrix.target }}
Expand Down Expand Up @@ -92,33 +84,14 @@ jobs:
run: echo "CARGO=cross" >> $GITHUB_ENV

- name: Build
run: ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }} --workspace --exclude scarb-prove --exclude scarb-verify ${{ !inputs.include-cairols && '--exclude scarb-cairo-language-server' || ''}} --no-default-features ${{ inputs.include-lint && '--features scarb/scarb-lint' || ''}}

- uses: dtolnay/rust-toolchain@master
if: inputs.include-stwo
with:
target: ${{ matrix.target }}
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}

- name: Install cross
if: matrix.cross && inputs.include-stwo
uses: taiki-e/install-action@cross

- name: Enable cross-compilation
if: matrix.cross && inputs.include-stwo
shell: bash
run: echo "CARGO=cross" >> $GITHUB_ENV

- name: Build nightly crates
if: inputs.include-stwo
run: ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }} -p scarb-prove -p scarb-verify
run: ${{ env.CARGO }} build --release --locked --target ${{ matrix.target }} --workspace ${{ !inputs.include-cairols && '--exclude scarb-cairo-language-server' || ''}} --no-default-features ${{ inputs.include-lint && '--features scarb/scarb-lint' || ''}}

- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}

- name: Create archive
run: cargo xtask create-archive ${{ !inputs.include-cairols && '--skip-cairols' || '' }} ${{ !inputs.include-stwo && '--skip-stwo' || '' }}
run: cargo xtask create-archive ${{ !inputs.include-cairols && '--skip-cairols' || '' }} --skip-stwo
env:
STAGING: scarb-${{ inputs.scarb-tag }}-${{ matrix.target }}
TARGET: ${{ matrix.target }}
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/_check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ on:
type: boolean
default: true

env:
# TODO(#1915): Use stable toolchain once stwo is stable.
RUST_NIGHTLY_TOOLCHAIN: "nightly-2025-07-14"

jobs:
test:
name: test ${{ matrix.name }}
Expand All @@ -43,15 +39,7 @@ jobs:
with:
ref: ${{ inputs.ref }}
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --profile=ci --all-features --no-fail-fast --workspace --exclude scarb-prove --exclude scarb-verify
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- name: Run nightly light tests
run: cargo +${{ env.RUST_NIGHTLY_TOOLCHAIN }} test --profile=ci --no-fail-fast -p scarb-prove -p scarb-verify --no-default-features

- name: Run nightly heavy tests
run: cargo +${{ env.RUST_NIGHTLY_TOOLCHAIN }} test --profile=ci --no-fail-fast -p scarb-prove -p scarb-verify --test heavy -- --test-threads=1
- run: cargo test --profile=ci --all-features --no-fail-fast --workspace

snforge-init:
runs-on: ubuntu-latest
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,10 @@ on:
description: "Upgrade CairoLint"
type: boolean
default: false
# upgrade-stwo:
# description: "Upgrade Stwo"
# type: boolean
# default: false
include-cairols:
description: "Include CairoLS in build"
type: boolean
default: true
include-stwo:
description: "Include Stwo in build"
type: boolean
default: true
include-lint:
description: "Include CairoLint in build"
type: boolean
Expand All @@ -45,8 +37,6 @@ jobs:
upgrade-cairo: ${{ inputs.upgrade-cairo }}
upgrade-cairols: ${{ inputs.upgrade-cairols }}
upgrade-cairolint: ${{ inputs.upgrade-cairolint }}
#upgrade-stwo: ${{ inputs.upgrade-stwo }}
include-cairols: ${{ inputs.include-cairols }}
include-stwo: ${{ inputs.include-stwo }}
include-lint: ${{ inputs.include-lint }}
is_dev: true
103 changes: 4 additions & 99 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != 'main' }}

env:
# TODO(#1915): Use stable toolchain once stwo is stable.
RUST_NIGHTLY_TOOLCHAIN: "nightly-2025-07-14"

jobs:
setup-matrix:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,7 +67,7 @@ jobs:
with:
tool: nextest@0.9.98
- name: nextest archive
run: cargo nextest archive --workspace --all-features --cargo-profile ci --archive-file 'nextest-archive-${{ matrix.platform.os }}.tar.zst' --exclude scarb-prove --exclude scarb-verify --exclude cairo-lang-macro
run: cargo nextest archive --workspace --all-features --cargo-profile ci --archive-file 'nextest-archive-${{ matrix.platform.os }}.tar.zst' --exclude cairo-lang-macro
- uses: actions/upload-artifact@v6
with:
name: nextest-archive-${{ matrix.platform.os }}
Expand Down Expand Up @@ -109,12 +105,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: run tests
run: cargo test --doc --workspace --exclude scarb-prove --exclude scarb-verify --exclude scarb-execute
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- name: run nightly tests
run: cargo test --doc -p scarb-prove -p scarb-verify -p scarb-execute
run: cargo test --doc --workspace

scarb-metadata-compatibility:
name: scarb-metadata compatibility check
Expand All @@ -131,72 +122,6 @@ jobs:
- name: run tests
run: cargo test -p scarb-metadata

build-nightly-test:
name: build nightly test ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
# TODO: Enable tests on windows when stwo supports it.
- name: linux x86-64
os: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- uses: taiki-e/install-action@v2
with:
tool: nextest@0.9.98
- uses: Swatinem/rust-cache@v2
- name: nextest archive
run: cargo nextest archive --all-features --cargo-profile ci --archive-file 'nextest-nightly-archive-${{ matrix.platform.os }}.tar.zst' --package scarb-prove --package scarb-verify
- uses: actions/upload-artifact@v6
with:
name: nextest-nightly-archive-${{ matrix.platform.os }}
path: nextest-nightly-archive-${{ matrix.platform.os }}.tar.zst

test-nightly:
name: test nightly ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
needs:
- build-test
- build-nightly-test
strategy:
fail-fast: false
matrix:
platform:
- name: linux x86-64
os: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
- uses: taiki-e/install-action@v2
with:
tool: nextest@0.9.98
- uses: Swatinem/rust-cache@v2
- name: Download stable build artifacts
uses: actions/download-artifact@v7
with:
name: nextest-archive-${{ matrix.platform.os }}
- name: Unpack build stable rust artifacts from nextest archive on linux
if: matrix.platform.os == 'ubuntu-latest'
run: |
tar --use-compress-program=unzstd -xvf nextest-archive-ubuntu-latest.tar.zst
mv target stable-crates-target
echo "NEXTEST_BIN_EXE_scarb=$GITHUB_WORKSPACE/stable-crates-target/ci/scarb" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/stable-crates-target/ci" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE/target/ci" >> $GITHUB_PATH
- name: Download nightly build artifacts
uses: actions/download-artifact@v7
with:
name: nextest-nightly-archive-${{ matrix.platform.os }}
- name: nextest partition
run: cargo nextest run --archive-file 'nextest-nightly-archive-${{ matrix.platform.os }}.tar.zst' --extract-to ./

test-cairo-lang-macro:
name: test cairo-lang-macro ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
Expand All @@ -223,12 +148,11 @@ jobs:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
# TODO(#1915): Build all crates with stable toolchain once stwo is stable.
- run: cargo clippy --all-targets --all-features --workspace --exclude scarb-prove --exclude scarb-verify -- --no-deps
- run: cargo clippy --all-targets --all-features --workspace -- --no-deps
env:
# Make sure CI fails on all warnings, including Clippy lints.
RUSTFLAGS: "-Dwarnings"
- run: cargo doc --all-features --no-deps --workspace --exclude scarb-prove --exclude scarb-verify
- run: cargo doc --all-features --no-deps --workspace
env:
# Make sure CI fails on all warnings, including Clippy lints.
RUSTDOCFLAGS: "-Dwarnings"
Expand All @@ -241,25 +165,6 @@ jobs:
- name: Machete
uses: bnjbvr/cargo-machete@v0.9.1

check-rust-nightly:
name: check-rust (nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo +${{ env.RUST_NIGHTLY_TOOLCHAIN }} clippy --all-targets --all-features -p scarb-prove -p scarb-verify -- --no-deps
env:
# Make sure CI fails on all warnings, including Clippy lints.
RUSTFLAGS: "-Dwarnings"
- run: cargo +${{ env.RUST_NIGHTLY_TOOLCHAIN }} doc --all-features --no-deps -p scarb-prove -p scarb-verify
env:
# Make sure CI fails on all warnings, including Clippy lints.
RUSTDOCFLAGS: "-Dwarnings"

check-website:
runs-on: ubuntu-latest
defaults:
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ on:
description: "Upgrade CairoLint"
type: boolean
default: true
# upgrade-stwo:
# description: "Upgrade Stwo"
# type: boolean
# default: true
workflow_call:
inputs:
dry_run:
Expand All @@ -41,18 +37,10 @@ on:
description: "Upgrade CairoLint"
type: boolean
default: true
# upgrade-stwo:
# description: "Upgrade Stwo"
# type: boolean
# default: true
include-cairols:
description: "Include CairoLS in build"
type: boolean
default: true
include-stwo:
description: "Include Stwo in build"
type: boolean
default: true
include-lint:
description: "Include CairoLint in build"
type: boolean
Expand Down Expand Up @@ -107,10 +95,6 @@ jobs:
if: ${{ !contains(inputs.upgrade-cairolint, 'false') }}
run: cargo xtask upgrade cairolint --rev $(git ls-remote --refs "https://github.com/software-mansion/cairo-lint" main | awk '{print $1}')

# - name: Upgrade stwo-cairo to latest main commit
# if: ${{ !contains(inputs.upgrade-stwo, 'false') }}
# run: cargo xtask upgrade stwo-cairo --rev $(git ls-remote --refs "https://github.com/starkware-libs/stwo-cairo" main | awk '{print $1}')

- name: Rebuild xtasks after Cargo.toml changes
run: cargo build -p xtask

Expand Down Expand Up @@ -188,7 +172,6 @@ jobs:
ref: ${{ needs.prepare.outputs.nightly_branch }}
full-verify: ${{ !inputs.is_dev }}
include-cairols: ${{ !contains(inputs.include-cairols, 'false') }}
include-stwo: ${{ !contains(inputs.include-stwo, 'false') }}
include-lint: ${{ !contains(inputs.include-lint, 'false') }}

upload:
Expand Down
Loading