Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Change storage type for forklift in GHA #4850

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .forklift/config-gitlab.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[compression]
type = "zstd"

[compression.zstd]
compressionLevel = 3

[general]
jobNameVariable = "CI_JOB_NAME"
jobsBlackList = []
logLevel = "warn"
threadsCount = 6

[cache]
extraEnv = ["RUNTIME_METADATA_HASH"]

[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"
10 changes: 3 additions & 7 deletions .forklift/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ job_name = "$CI_JOB_NAME"
project_name = "$CI_PROJECT_PATH"

[storage]
type = "s3"
type = "gcs"

[storage.s3]
accessKeyId = "placeholder"
bucketName = "placeholder"
concurrency = 10
endpointUrl = "placeholder"
secretAccessKey = "placeholder"
[storage.gcs]
bucketName = "parity-ci-forklift"
7 changes: 0 additions & 7 deletions .github/workflows/check-runtime-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ 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.
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ 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:

changes:
permissions:
pull-requests: read
Expand All @@ -31,7 +23,7 @@ jobs:
# 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.
needs: changes
if: ${{ needs.changes.outputs.rust }}
if: ${{ needs.changes.outputs.rust }}
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
Expand All @@ -40,10 +32,10 @@ jobs:
uses: actions/checkout@v4
- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT

test-linux-stable-int:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
container:
Expand All @@ -60,11 +52,11 @@ jobs:
uses: actions/checkout@v4
- name: script
run: WASM_BUILD_NO_COLOR=1 time forklift cargo test -p staging-node-cli --release --locked -- --ignored

# https://github.com/paritytech/ci_cd/issues/864
test-linux-stable-runtime-benchmarks:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
container:
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,7 @@ 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:

changes:
permissions:
pull-requests: read
Expand All @@ -40,7 +32,7 @@ jobs:

quick-benchmarks:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
container:
Expand All @@ -55,11 +47,11 @@ jobs:
uses: actions/checkout@v4
- name: script
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

# cf https://github.com/paritytech/polkadot-sdk/issues/1652
test-syscalls:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
container:
Expand All @@ -81,10 +73,10 @@ jobs:
# - if [[ "$CI_JOB_STATUS" == "failed" ]]; then
# printf "The x86_64 syscalls used by the worker binaries have changed. Please review if this is expected and update polkadot/scripts/list-syscalls/*-worker-syscalls as needed.\n";
# fi

cargo-check-all-benches:
needs: [set-image, changes]
if: ${{ needs.changes.outputs.rust }}
if: ${{ needs.changes.outputs.rust }}
runs-on: arc-runners-polkadot-sdk-beefy
timeout-minutes: 30
container:
Expand Down
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ default:
.forklift-cache:
before_script:
- mkdir ~/.forklift
- cp .forklift/config.toml ~/.forklift/config.toml
- cp .forklift/config-gitlab.toml ~/.forklift/config.toml
- cat .forklift/config-gitlab.toml > .forklift/config.toml
- >
if [ "$FORKLIFT_BYPASS" != "true" ]; then
echo "FORKLIFT_BYPASS not set";
Expand Down
Loading