From 8f8b682446612fcbe5426d934083a7dcdefd9859 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Mon, 13 May 2024 11:54:32 +0200 Subject: [PATCH] [ci] Add forklift to GHA ARC (#4372) PR adds forklift settings and forklift to test-github-actions cc https://github.com/paritytech/ci_cd/issues/939 --- .forklift/config.toml | 30 +++++++++++++++++++++++ .github/workflows/quick-checks.yml | 14 +++++------ .github/workflows/test-github-actions.yml | 11 +++++++-- .gitlab-ci.yml | 2 +- 4 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 .forklift/config.toml diff --git a/.forklift/config.toml b/.forklift/config.toml new file mode 100644 index 0000000000000..403a452aa036f --- /dev/null +++ b/.forklift/config.toml @@ -0,0 +1,30 @@ +[compression] +type = "zstd" + +[compression.zstd] +compressionLevel = 3 + +[general] +jobNameVariable = "CI_JOB_NAME" +jobsBlackList = [] +logLevel = "warn" +threadsCount = 6 + +[metrics] +enabled = true +pushEndpoint = "placeholder" + +[metrics.extraLabels] +environment = "production" +job_name = "$CI_JOB_NAME" +project_name = "$CI_PROJECT_PATH" + +[storage] +type = "s3" + +[storage.s3] +accessKeyId = "placeholder" +bucketName = "placeholder" +concurrency = 10 +endpointUrl = "placeholder" +secretAccessKey = "placeholder" diff --git a/.github/workflows/quick-checks.yml b/.github/workflows/quick-checks.yml index 7bf1983a1f69c..a56bf12bb1622 100644 --- a/.github/workflows/quick-checks.yml +++ b/.github/workflows/quick-checks.yml @@ -14,7 +14,7 @@ jobs: # GitHub Actions allows using 'env' in a container context. # However, env variables don't work for forks: https://github.com/orgs/community/discussions/44322 # This workaround sets the container image for each job using 'set-image' job output. - runs-on: arc-runners-polkadot-sdk-default + runs-on: arc-runners-polkadot-sdk timeout-minutes: 10 outputs: IMAGE: ${{ steps.set_image.outputs.IMAGE }} @@ -24,7 +24,7 @@ jobs: - id: set_image run: cat .github/env >> $GITHUB_OUTPUT fmt: - runs-on: arc-runners-polkadot-sdk-default + runs-on: arc-runners-polkadot-sdk timeout-minutes: 10 needs: [set-image] container: @@ -34,7 +34,7 @@ jobs: - name: Cargo fmt run: cargo +nightly fmt --all -- --check check-dependency-rules: - runs-on: arc-runners-polkadot-sdk-default + runs-on: arc-runners-polkadot-sdk timeout-minutes: 10 needs: [set-image] container: @@ -46,8 +46,7 @@ jobs: cd substrate/ ../.gitlab/ensure-deps.sh check-rust-feature-propagation: - runs-on: arc-runners-polkadot-sdk-default - # runs-on: ubuntu-latest + runs-on: arc-runners-polkadot-sdk timeout-minutes: 10 needs: [set-image] container: @@ -57,8 +56,7 @@ jobs: - name: run zepter run: zepter run check test-rust-features: - runs-on: arc-runners-polkadot-sdk-default - # runs-on: ubuntu-latest + runs-on: arc-runners-polkadot-sdk timeout-minutes: 10 needs: [set-image] container: @@ -68,7 +66,7 @@ jobs: - name: run rust features run: bash .gitlab/rust-features.sh . check-toml-format: - runs-on: arc-runners-polkadot-sdk-default + runs-on: arc-runners-polkadot-sdk timeout-minutes: 10 needs: [set-image] container: diff --git a/.github/workflows/test-github-actions.yml b/.github/workflows/test-github-actions.yml index e35ee09948634..5dbdb7156d51a 100644 --- a/.github/workflows/test-github-actions.yml +++ b/.github/workflows/test-github-actions.yml @@ -8,6 +8,13 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +env: + FORKLIFT_storage_s3_bucketName: ${{ secrets.FORKLIFT_storage_s3_bucketName }} + FORKLIFT_storage_s3_accessKeyId: ${{ secrets.FORKLIFT_storage_s3_accessKeyId }} + FORKLIFT_storage_s3_secretAccessKey: ${{ secrets.FORKLIFT_storage_s3_secretAccessKey }} + FORKLIFT_storage_s3_endpointUrl: ${{ secrets.FORKLIFT_storage_s3_endpointUrl }} + FORKLIFT_metrics_pushEndpoint: ${{ secrets.FORKLIFT_metrics_pushEndpoint }} + jobs: set-image: # GitHub Actions allows using 'env' in a container context. @@ -38,7 +45,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: script - run: WASM_BUILD_NO_COLOR=1 time cargo test -p staging-node-cli --release --locked -- --ignored + run: WASM_BUILD_NO_COLOR=1 time forklift cargo test -p staging-node-cli --release --locked -- --ignored quick-benchmarks: runs-on: arc-runners-polkadot-sdk-beefy timeout-minutes: 30 @@ -54,4 +61,4 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: script - 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 + 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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e57dd86f1416..73a8c52c448f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -120,7 +120,7 @@ default: .forklift-cache: before_script: - mkdir ~/.forklift - - cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml + - cp .forklift/config.toml ~/.forklift/config.toml - > if [ "$FORKLIFT_BYPASS" != "true" ]; then echo "FORKLIFT_BYPASS not set";