-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(infra): use rust-toolchain.toml to align rust toolchains locall…
…y and in ci
- Loading branch information
1 parent
00b348d
commit 59239d8
Showing
13 changed files
with
8 additions
and
63 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 |
---|---|---|
@@ -1,27 +1,4 @@ | ||
# Installs rust toolchain with the version defined in .github/actions/install_rust/rust_version.txt. | ||
inputs: | ||
components: | ||
description: "Optional: which additional components to install." | ||
required: false | ||
type: string | ||
default: '' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Define toolchain | ||
run: echo "DEFAULT_TOOLCHAIN=$(cat .github/actions/install_rust/rust_version.txt)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: install rust toolchain with given components | ||
if: "${{ inputs.components != '' }}" | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.DEFAULT_TOOLCHAIN }} | ||
components: ${{ inputs.components }} | ||
|
||
- name: install rust toolchain without given components | ||
if: "${{ inputs.components == '' }}" | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.DEFAULT_TOOLCHAIN }} | ||
- uses: moonrepo/setup-rust@v1 |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -17,9 +17,6 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Noelware/[email protected] | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: "v0-rust-ubuntu-20.04" | ||
|
||
# Setup pypy and link to the location expected by .cargo/config.toml. | ||
- uses: actions/setup-python@v5 | ||
|
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 |
---|---|---|
|
@@ -69,8 +69,6 @@ jobs: | |
|
||
# Install rust components. | ||
- uses: ./.github/actions/install_rust | ||
with: | ||
components: rustfmt, clippy | ||
|
||
# Run tests. | ||
- name: "Run rustfmt and clippy" | ||
|
@@ -94,7 +92,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo test -p workspace_tests | ||
|
||
run-tests: | ||
|
@@ -106,9 +103,6 @@ jobs: | |
fetch-depth: 0 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Noelware/[email protected] | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: "v0-rust-ubuntu-20.04" | ||
|
||
# Setup pypy and link to the location expected by .cargo/config.toml. | ||
- uses: actions/setup-python@v5 | ||
|
@@ -183,9 +177,6 @@ jobs: | |
|
||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: "v0-rust-ubuntu-20.04" | ||
- run: npm install -g [email protected] | ||
|
||
# Setup pypy and link to the location expected by .cargo/config.toml. | ||
|
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 |
---|---|---|
|
@@ -47,7 +47,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
@@ -66,7 +65,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
@@ -85,7 +83,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
@@ -102,7 +99,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: Noelware/[email protected] | ||
|
||
- run: | | ||
|
@@ -150,7 +146,6 @@ jobs: | |
target_directory: | ||
- 'crates/papyrus_storage/src/db/**' | ||
- 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 | ||
if: steps.changes.outputs.target_directory == 'true' |
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 |
---|---|---|
|
@@ -38,7 +38,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: mkdir data | ||
|
||
|
@@ -58,7 +57,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: npm install -g [email protected] | ||
|
||
- run: brew install protobuf@$PROTOC_VERSION | ||
|
@@ -74,7 +72,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo build -r -p papyrus_load_test | ||
|
||
integration-test: | ||
|
@@ -83,7 +80,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install_rust | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: > | ||
cargo test -r | ||
--test latency_histogram | ||
|
@@ -99,5 +95,4 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ const Configuration = { | |
'fee', | ||
'gateway', | ||
'helm', | ||
'infra', | ||
'JSON-RPC', | ||
'load_test', | ||
'mempool_node', | ||
|
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,5 @@ | ||
[toolchain] | ||
channel = "stable" | ||
components = [ "rustfmt", "rustc-dev", "clippy" ] | ||
targets = [ "x86_64-unknown-linux-gnu" ] | ||
profile = "default" |
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