-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Replace actions-rs actions in GitHub workflows #678
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e08018d
ci: Drop actions-rs/cargo action in favor of directly running cargo
Xanewok 795a595
ci: Migrate off unmaintained actions-rs/toolchain
Xanewok d322298
feat: Install Rustup if not found on the self-hosted runner
Xanewok 7c9630a
feat: Set the CARGO_HOME explicitly
Xanewok 2341279
Use a more maintained action for installing a Rust toolchain
Xanewok 83f9a8f
ci: Streamline nightly Rustfmt installation
Xanewok e7796f7
ci: Add toolchain/components inputs to setup-rust
Xanewok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,13 +1,28 @@ | ||
name: Setup rust | ||
description: Sets up rust | ||
name: Setup Rust | ||
description: Sets up Rust | ||
inputs: | ||
toolchain: | ||
description: The Rust toolchain to use | ||
required: false | ||
components: | ||
description: Comma-separated list of components to install | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Rust (stable) | ||
uses: actions-rs/toolchain@v1 | ||
- name: Install Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
# Empty string means rust-toolchain if it exists, otherwise stable | ||
toolchain: ${{ inputs.toolchain }} | ||
components: ${{ inputs.components }} | ||
cache: true | ||
# Do not override the RUSTFLAGS by default and instead do that per job, | ||
# if needed. Setting RUSTFLAGS via env var, config, etc. is mutually | ||
# exclusive and often a source of bugs. | ||
# Empty string here means no override. | ||
rustflags: "" | ||
# By default, we do not override the toolchain from rust-toolchain. | ||
# The user needs to explicitly use `<cmd> +<toolchain>` for clarity. | ||
override: false |
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 |
---|---|---|
|
@@ -14,13 +14,7 @@ jobs: | |
with: | ||
ref: feat/multichain | ||
|
||
- name: Install Rust (stable) | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
- uses: ./.github/actions/setup-rust | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
- name: Cache EDR RPC cache | ||
uses: actions/cache@v4 | ||
|
@@ -29,11 +23,7 @@ jobs: | |
**/edr-cache | ||
key: test-recent-optimism-block-rpc-cache-v1 | ||
|
||
- name: Run test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: replay-block | ||
args: -u ${{ secrets.ALCHEMY_URL }} -c optimism | ||
- run: cargo replay-block -u ${{ secrets.ALCHEMY_URL }} -c optimism | ||
|
||
- name: Notify failures | ||
if: failure() | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest pinning the version of this action to a commit ref unless it comes from an organization we own or trust. Otherwise, we could open up an attack vector.
Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions