Skip to content

Commit 477a120

Browse files
authored
[ci] Add forklift to GHA ARC (#4372)
PR adds forklift settings and forklift to test-github-actions cc paritytech/ci_cd#939
1 parent 6d3a6d8 commit 477a120

File tree

4 files changed

+46
-11
lines changed

4 files changed

+46
-11
lines changed

.forklift/config.toml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[compression]
2+
type = "zstd"
3+
4+
[compression.zstd]
5+
compressionLevel = 3
6+
7+
[general]
8+
jobNameVariable = "CI_JOB_NAME"
9+
jobsBlackList = []
10+
logLevel = "warn"
11+
threadsCount = 6
12+
13+
[metrics]
14+
enabled = true
15+
pushEndpoint = "placeholder"
16+
17+
[metrics.extraLabels]
18+
environment = "production"
19+
job_name = "$CI_JOB_NAME"
20+
project_name = "$CI_PROJECT_PATH"
21+
22+
[storage]
23+
type = "s3"
24+
25+
[storage.s3]
26+
accessKeyId = "placeholder"
27+
bucketName = "placeholder"
28+
concurrency = 10
29+
endpointUrl = "placeholder"
30+
secretAccessKey = "placeholder"

.github/workflows/quick-checks.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# GitHub Actions allows using 'env' in a container context.
1515
# However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322
1616
# This workaround sets the container image for each job using 'set-image' job output.
17-
runs-on: arc-runners-polkadot-sdk-default
17+
runs-on: arc-runners-polkadot-sdk
1818
timeout-minutes: 10
1919
outputs:
2020
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
@@ -24,7 +24,7 @@ jobs:
2424
- id: set_image
2525
run: cat .github/env >> $GITHUB_OUTPUT
2626
fmt:
27-
runs-on: arc-runners-polkadot-sdk-default
27+
runs-on: arc-runners-polkadot-sdk
2828
timeout-minutes: 10
2929
needs: [set-image]
3030
container:
@@ -34,7 +34,7 @@ jobs:
3434
- name: Cargo fmt
3535
run: cargo +nightly fmt --all -- --check
3636
check-dependency-rules:
37-
runs-on: arc-runners-polkadot-sdk-default
37+
runs-on: arc-runners-polkadot-sdk
3838
timeout-minutes: 10
3939
needs: [set-image]
4040
container:
@@ -46,8 +46,7 @@ jobs:
4646
cd substrate/
4747
../.gitlab/ensure-deps.sh
4848
check-rust-feature-propagation:
49-
runs-on: arc-runners-polkadot-sdk-default
50-
# runs-on: ubuntu-latest
49+
runs-on: arc-runners-polkadot-sdk
5150
timeout-minutes: 10
5251
needs: [set-image]
5352
container:
@@ -57,8 +56,7 @@ jobs:
5756
- name: run zepter
5857
run: zepter run check
5958
test-rust-features:
60-
runs-on: arc-runners-polkadot-sdk-default
61-
# runs-on: ubuntu-latest
59+
runs-on: arc-runners-polkadot-sdk
6260
timeout-minutes: 10
6361
needs: [set-image]
6462
container:
@@ -68,7 +66,7 @@ jobs:
6866
- name: run rust features
6967
run: bash .gitlab/rust-features.sh .
7068
check-toml-format:
71-
runs-on: arc-runners-polkadot-sdk-default
69+
runs-on: arc-runners-polkadot-sdk
7270
timeout-minutes: 10
7371
needs: [set-image]
7472
container:

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

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

11+
env:
12+
FORKLIFT_storage_s3_bucketName: ${{ secrets.FORKLIFT_storage_s3_bucketName }}
13+
FORKLIFT_storage_s3_accessKeyId: ${{ secrets.FORKLIFT_storage_s3_accessKeyId }}
14+
FORKLIFT_storage_s3_secretAccessKey: ${{ secrets.FORKLIFT_storage_s3_secretAccessKey }}
15+
FORKLIFT_storage_s3_endpointUrl: ${{ secrets.FORKLIFT_storage_s3_endpointUrl }}
16+
FORKLIFT_metrics_pushEndpoint: ${{ secrets.FORKLIFT_metrics_pushEndpoint }}
17+
1118
jobs:
1219
set-image:
1320
# GitHub Actions allows using 'env' in a container context.
@@ -38,7 +45,7 @@ jobs:
3845
- name: Checkout
3946
uses: actions/checkout@v4
4047
- name: script
41-
run: WASM_BUILD_NO_COLOR=1 time cargo test -p staging-node-cli --release --locked -- --ignored
48+
run: WASM_BUILD_NO_COLOR=1 time forklift cargo test -p staging-node-cli --release --locked -- --ignored
4249
quick-benchmarks:
4350
runs-on: arc-runners-polkadot-sdk-beefy
4451
timeout-minutes: 30
@@ -54,4 +61,4 @@ jobs:
5461
- name: Checkout
5562
uses: actions/checkout@v4
5663
- name: script
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
64+
run: time forklift 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

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ default:
120120
.forklift-cache:
121121
before_script:
122122
- mkdir ~/.forklift
123-
- cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml
123+
- cp .forklift/config.toml ~/.forklift/config.toml
124124
- >
125125
if [ "$FORKLIFT_BYPASS" != "true" ]; then
126126
echo "FORKLIFT_BYPASS not set";

0 commit comments

Comments
 (0)