-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): make rust version in ci configurable
- Loading branch information
1 parent
439a24c
commit 0a48a3c
Showing
11 changed files
with
51 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Installs rust toolchain. In order to set/fix the version, edit lines 15 & 22. | ||
inputs: | ||
components: | ||
description: "An optional parameter that will be sent to dtolnay/rust-toolchain." | ||
required: false | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: fix version | ||
run: echo "RUST_VERSION=stable" >> $GITHUB_ENV | ||
- name: install rust toolchain with given components | ||
if: "${{ inputs.components != '' }}" | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
components: ${{ inputs.components }} | ||
|
||
- name: install rust toolchain without given components | ||
if: "${{ inputs.components == '' }}" | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,7 @@ jobs: | |
runs-on: starkware-ubuntu-20-04-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Noelware/[email protected] | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: "v0-rust-ubuntu-20.04" | ||
|
@@ -41,4 +40,4 @@ jobs: | |
|
||
- run: | ||
pip install -r crates/blockifier/tests/requirements.txt; | ||
cargo test verify_feature_contracts -- --include-ignored | ||
cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
runs-on: starkware-ubuntu-20-04-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Noelware/[email protected] | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ jobs: | |
runs-on: starkware-ubuntu-20-04-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
- uses: dtolnay/rust-toolchain@master # TODO(Nimrod, 15/8/2024): Use stable toolchain. | ||
with: | ||
components: rustfmt | ||
toolchain: nightly-2024-04-29 | ||
|
@@ -58,7 +58,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Noelware/[email protected] | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
with: | ||
components: clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
|
@@ -83,7 +83,7 @@ jobs: | |
# RUSTDOCFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
|
@@ -97,7 +97,7 @@ jobs: | |
with: | ||
# Fetch the entire history. | ||
fetch-depth: 0 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Noelware/[email protected] | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
|
@@ -137,7 +137,7 @@ jobs: | |
runs-on: starkware-ubuntu-latest-small | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: baptiste0928/cargo-install@v3 | ||
with: | ||
|
@@ -159,7 +159,7 @@ jobs: | |
RUSTDOCFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ jobs: | |
runs-on: starkware-ubuntu-latest-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
|
@@ -60,7 +60,7 @@ jobs: | |
runs-on: starkware-ubuntu-latest-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
|
@@ -79,7 +79,7 @@ jobs: | |
runs-on: starkware-ubuntu-latest-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
|
@@ -96,7 +96,7 @@ jobs: | |
runs-on: starkware-ubuntu-latest-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
|
||
|
@@ -109,7 +109,7 @@ jobs: | |
runs-on: starkware-ubuntu-latest-medium | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- name: Set-Up | ||
run: | | ||
sudo apt-get update | ||
|
@@ -173,7 +173,7 @@ jobs: | |
filters: | | ||
target_directory: | ||
- 'crates/papyrus_storage/src/db/**' | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
# repeat this job 32 times. this is a random test for part of the code that may cause a corrupted database. | ||
- run: for run in {1..32}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ jobs: | |
if: github.event.schedule == '30 0 * * *' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: mkdir data | ||
|
@@ -57,7 +57,7 @@ jobs: | |
if: github.event.schedule == '30 0 * * *' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: npm install -g [email protected] | ||
|
||
|
@@ -73,7 +73,7 @@ jobs: | |
if: github.event.schedule == '30 0 * * *' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo build -r -p papyrus_load_test | ||
|
||
|
@@ -82,7 +82,7 @@ jobs: | |
if: github.event.schedule == '30 0 * * *' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: > | ||
cargo test -r | ||
|
@@ -98,6 +98,6 @@ jobs: | |
runs-on: starkware-ubuntu-latest-small | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: for run in {1..100}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters