From 66650a4631b5b2fdf1a333c58139f5bfef935b9f Mon Sep 17 00:00:00 2001 From: Evgeny Snitko Date: Sat, 21 Oct 2023 04:41:56 +0400 Subject: [PATCH] rustc_wrapper mode --- .gitlab/pipeline/build.yml | 46 +++++++------------------------------- .gitlab/pipeline/test.yml | 45 +++++++------------------------------ 2 files changed, 16 insertions(+), 75 deletions(-) diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml index aeab7ecb4231..766fe5c86f1e 100644 --- a/.gitlab/pipeline/build.yml +++ b/.gitlab/pipeline/build.yml @@ -18,50 +18,20 @@ build-linux-stable: # Ensure we run the UI tests. RUN_UI_TESTS: 1 script: - # forklift: Download modified cargo and forklift - - echo "CARGO_MOD_VERSION ${FL_CARGO_MOD_VERSION}" - - echo "FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}" - - 'curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o cargo-mod -L "${CI_API_V4_URL}/projects/677/packages/generic/cargo-mod/${FL_CARGO_MOD_VERSION}/cargo-mod_${FL_CARGO_MOD_VERSION}_linux_amd64"' + # forklift: download binary - 'curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64"' - - chmod +x cargo-mod - - chmod +x forklift - # - # forklift: precalculate hashed (keep the same flags with real cargo run) - - ./cargo-mod build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker > items.cache - # forklift: fix timestamp (git restore-mtime, included in ci-unified) - - find /usr/local/cargo/registry/src/ -exec touch -t 202005260100 {} + - - find . -exec touch -t 202005260100 {} + + - chmod +x forklift + - mkdir .forklift + - cp $FL_FORKLIFT_CONFIG .forklift/config.toml - git restore-mtime - - tail items.cache # - # forklift: download cache - - ./forklift pull - --verbose debug - --mode testnet - --storage s3 - -p S3_ACCESS_KEY_ID=$FL_GCS_S3_ACCESS_KEY_ID - -p S3_SECRET_ACCESS_KEY=$FL_GCS_S3_SECRET_ACCESS_KEY - -p S3_ENDPOINT_URL=https://storage.googleapis.com - -p S3_BUCKET_NAME=forklift-cache-parity-build-stg - -c zstd - -p COMPRESSION_LEVEL=1 - --extra-dir wbuild - . + # forklift: env + - export RUSTC_WRAPPER="$(pwd)/forklift" + - export FORKLIFT_WORK_DIR="$(pwd)" # - time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker - # forklift: upload new artifacts + # forklift: upload new artifacts - ./forklift push - --verbose debug - --mode testnet - --storage s3 - -p S3_ACCESS_KEY_ID=$FL_GCS_S3_ACCESS_KEY_ID - -p S3_SECRET_ACCESS_KEY=$FL_GCS_S3_SECRET_ACCESS_KEY - -p S3_ENDPOINT_URL=https://storage.googleapis.com - -p S3_BUCKET_NAME=forklift-cache-parity-build-stg - -c zstd - -p COMPRESSION_LEVEL=1 - --extra-dir wbuild - . # - time ROCOCO_EPOCH_DURATION=10 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-10/ - time ROCOCO_EPOCH_DURATION=100 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-100/ diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml index 5b02d8cfff69..2b67c2c2545f 100644 --- a/.gitlab/pipeline/test.yml +++ b/.gitlab/pipeline/test.yml @@ -24,35 +24,16 @@ test-linux-stable: # add experimental to features after https://github.com/paritytech/substrate/pull/14502 is merged # "upgrade_version_checks_should_work" is currently failing # - # forklift: Download modified cargo and forklift - - echo "CARGO_MOD_VERSION ${FL_CARGO_MOD_VERSION}" - - echo "FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}" - - 'curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o cargo-mod -L "${CI_API_V4_URL}/projects/677/packages/generic/cargo-mod/${FL_CARGO_MOD_VERSION}/cargo-mod_${FL_CARGO_MOD_VERSION}_linux_amd64"' + # forklift: download binary - 'curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64"' - - chmod +x cargo-mod - - chmod +x forklift - # - # forklift: precalculate hashed (keep the same flags with real cargo run) - - ./cargo-mod test --workspace --locked --release --no-fail-fast --features try-runtime,experimental > items.cache - # forklift: fix timestamp (git restore-mtime, included in ci-unified) - - find /usr/local/cargo/registry/src/ -exec touch -t 202005260100 {} + - - find . -exec touch -t 202005260100 {} + + - chmod +x forklift + - mkdir .forklift + - cp $FL_FORKLIFT_CONFIG .forklift/config.toml - git restore-mtime - - tail items.cache # - # forklift: download cache - - ./forklift pull - --verbose debug - --mode release - --storage s3 - -p S3_ACCESS_KEY_ID=$FL_GCS_S3_ACCESS_KEY_ID - -p S3_SECRET_ACCESS_KEY=$FL_GCS_S3_SECRET_ACCESS_KEY - -p S3_ENDPOINT_URL=https://storage.googleapis.com - -p S3_BUCKET_NAME=forklift-cache-parity-build-stg - -c zstd - -p COMPRESSION_LEVEL=1 - --extra-dir wbuild - . + # forklift: env + - export RUSTC_WRAPPER="$(pwd)/forklift" + - export FORKLIFT_WORK_DIR="$(pwd)" # - | time cargo nextest run \ @@ -75,17 +56,7 @@ test-linux-stable: # # forklift: upload new artifacts - ./forklift push - --verbose debug - --mode release - --storage s3 - -p S3_ACCESS_KEY_ID=$FL_GCS_S3_ACCESS_KEY_ID - -p S3_SECRET_ACCESS_KEY=$FL_GCS_S3_SECRET_ACCESS_KEY - -p S3_ENDPOINT_URL=https://storage.googleapis.com - -p S3_BUCKET_NAME=forklift-cache-parity-build-stg - -c zstd - -p COMPRESSION_LEVEL=1 - --extra-dir wbuild - . + # # run runtime-api tests with `enable-staging-api` feature on the 1st node - if [ ${CI_NODE_INDEX} == 1 ]; then time cargo nextest run -p sp-api-test --features enable-staging-api; fi artifacts: