-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (40 loc) · 1.38 KB
/
staking-miner-playground.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Polkadot Staking Miner Playground CI
on:
pull_request:
branches:
- main
paths:
- 'staking-miner-playground/**'
env:
IMAGE: paritytech/ci-unified:bullseye-1.81.0-2024-09-11
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 }}
SKIP_WASM_BUILD=1 cargo check --manifest-path staking-miner-playground/Cargo.toml