-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: staking-miner-playground check only if changed (#848)
* ci: staking-miner-playground check only changed * fix ci steps * update staking-miner-playground deps * Update staking-miner-playground/Cargo.lock
- Loading branch information
Showing
3 changed files
with
60 additions
and
34 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
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,47 @@ | ||
name: Polkadot Staking Miner Playground CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'staking-miner-playground/**' | ||
|
||
env: | ||
IMAGE: paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408 | ||
IMAGE_NAME: paritytech/polkadot-staking-miner | ||
RUST_INFO: rustup show && cargo --version && rustup +nightly show && cargo +nightly --version | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
set-image: | ||
# GitHub Actions does not allow using 'env' in a container context. | ||
# This workaround sets the container image for each job using 'set-image' job output. | ||
runs-on: ubuntu-latest | ||
outputs: | ||
IMAGE: ${{ steps.set_image.outputs.IMAGE }} | ||
steps: | ||
- id: set_image | ||
run: echo "IMAGE=${{ env.IMAGE }}" >> $GITHUB_OUTPUT | ||
|
||
check: | ||
name: Check staking-miner-playground | ||
runs-on: ubuntu-latest | ||
needs: [set-image] | ||
container: ${{ needs.set-image.outputs.IMAGE }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache Rust dependencies | ||
uses: swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Check staking-miner-playground | ||
run: | | ||
${{ env.RUST_INFO }} | ||
cargo check --manifest-path staking-miner-playground/Cargo.toml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.