Skip to content

Commit 7fa855e

Browse files
alvicsamTarekkMA
authored andcommitted
1 parent 89e3b16 commit 7fa855e

File tree

3 files changed

+101
-8
lines changed

3 files changed

+101
-8
lines changed

.github/env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"

.github/workflows/quick-checks.yml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Checks that doesn't require heavy lifting, like formatting, linting, etc.
2+
name: quick-checks
3+
4+
on:
5+
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review]
7+
merge_group:
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
set-image:
14+
# GitHub Actions allows using 'env' in a container context.
15+
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
16+
# This workaround sets the container image for each job using 'set-image' job output.
17+
runs-on: arc-runners-polkadot-sdk-default
18+
timeout-minutes: 10
19+
outputs:
20+
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- id: set_image
25+
run: cat .github/env >> $GITHUB_OUTPUT
26+
fmt:
27+
runs-on: arc-runners-polkadot-sdk-default
28+
timeout-minutes: 10
29+
needs: [set-image]
30+
container:
31+
image: ${{ needs.set-image.outputs.IMAGE }}
32+
steps:
33+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
34+
- name: Cargo fmt
35+
run: cargo +nightly fmt --all -- --check
36+
check-dependency-rules:
37+
runs-on: arc-runners-polkadot-sdk-default
38+
timeout-minutes: 10
39+
needs: [set-image]
40+
container:
41+
image: ${{ needs.set-image.outputs.IMAGE }}
42+
steps:
43+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
44+
- name: check dependency rules
45+
run: |
46+
cd substrate/
47+
../.gitlab/ensure-deps.sh
48+
check-rust-feature-propagation:
49+
runs-on: arc-runners-polkadot-sdk-default
50+
# runs-on: ubuntu-latest
51+
timeout-minutes: 10
52+
needs: [set-image]
53+
container:
54+
image: ${{ needs.set-image.outputs.IMAGE }}
55+
steps:
56+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
57+
- name: run zepter
58+
run: zepter run check
59+
test-rust-features:
60+
runs-on: arc-runners-polkadot-sdk-default
61+
# runs-on: ubuntu-latest
62+
timeout-minutes: 10
63+
needs: [set-image]
64+
container:
65+
image: ${{ needs.set-image.outputs.IMAGE }}
66+
steps:
67+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
68+
- name: run rust features
69+
run: bash .gitlab/rust-features.sh .
70+
check-toml-format:
71+
runs-on: arc-runners-polkadot-sdk-default
72+
timeout-minutes: 10
73+
needs: [set-image]
74+
container:
75+
image: ${{ needs.set-image.outputs.IMAGE }}
76+
steps:
77+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
78+
- name: check toml format
79+
run: |
80+
taplo format --check --config .config/taplo.toml
81+
echo "Please run `taplo format --config .config/taplo.toml` to fix any toml formatting issues"

.github/workflows/test-github-actions.yml

+19-8
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,25 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
99
cancel-in-progress: true
1010

11-
env:
12-
CARGO_NET_GIT_FETCH_WITH_CLI: true
13-
1411
jobs:
12+
set-image:
13+
# GitHub Actions allows using 'env' in a container context.
14+
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
15+
# This workaround sets the container image for each job using 'set-image' job output.
16+
runs-on: ubuntu-latest
17+
outputs:
18+
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- id: set_image
23+
run: cat .github/env >> $GITHUB_OUTPUT
1524
test-linux-stable-int:
16-
runs-on: arc-runners-polkadot-sdk
25+
runs-on: arc-runners-polkadot-sdk-beefy
1726
timeout-minutes: 30
27+
needs: [set-image]
1828
container:
19-
image: "docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"
29+
image: ${{ needs.set-image.outputs.IMAGE }}
2030
env:
2131
RUSTFLAGS: "-C debug-assertions -D warnings"
2232
RUST_BACKTRACE: 1
@@ -30,10 +40,11 @@ jobs:
3040
- name: script
3141
run: WASM_BUILD_NO_COLOR=1 time cargo test -p staging-node-cli --release --locked -- --ignored
3242
quick-benchmarks:
33-
runs-on: arc-runners-polkadot-sdk
43+
runs-on: arc-runners-polkadot-sdk-beefy
3444
timeout-minutes: 30
45+
needs: [set-image]
3546
container:
36-
image: "docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408"
47+
image: ${{ needs.set-image.outputs.IMAGE }}
3748
env:
3849
RUSTFLAGS: "-C debug-assertions -D warnings"
3950
RUST_BACKTRACE: "full"
@@ -43,4 +54,4 @@ jobs:
4354
- name: Checkout
4455
uses: actions/checkout@v4
4556
- name: script
46-
run: time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
57+
run: time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet

0 commit comments

Comments
 (0)