mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 05:38:00 +00:00
85b06f18b9
* [WIP] PVF: Split out worker binaries * Address compilation problems and re-design a bit * Reorganize once more, fix tests * Reformat with new nightly to make `cargo fmt` test happy * Address `clippy` warnings * Add temporary trace to debug zombienet tests * Fix zombienet node upgrade test * Fix malus and its CI * Fix building worker binaries with malus * More fixes for malus * Remove unneeded cli subcommands * Support placing auxiliary binaries to `/usr/libexec` * Fix spelling * Spelling Co-authored-by: Marcin S. <marcin@realemail.net> * Implement review comments (mostly nits) * Fix worker node version flag * Rework getting the worker paths * Address a couple of review comments * Minor restructuring * Fix CI error * Add tests for worker binaries detection * Improve tests; try to fix CI * Move workers module into separate file * Try to fix failing test and workers not printing latest version - Tests were not finding the worker binaries - Workers were not being rebuilt when the version changed - Made some errors easier to read * Make a bunch of fixes * Rebuild nodes on version change * Fix more issues * Fix tests * Pass node version from node into dependencies to avoid recompiles - [X] get version in CLI - [X] pass it in to service - [X] pass version along to PVF - [X] remove rerun from service - [X] add rerun to CLI - [X] don’t rerun pvf/worker’s (these should be built by nodes which have rerun enabled) * Some more improvements for smoother tests - [X] Fix tests - [X] Make puppet workers pass None for version and remove rerun - [X] Make test collators self-contained * Add back rerun to PVF workers * Move worker binaries into files in cli crate As a final optimization I've separated out each worker binary from its own crate into the CLI crate. Before, the worker bin shared a crate with the worker lib, so when the binaries got recompiled so did the libs and everything transitively depending on the libs. This commit fixes this regression that was causing recompiles after every commit. * Fix bug (was passing worker version for node version) * Move workers out of cli into root src/bin/ dir - [X] Pass in node version from top-level (polkadot) - [X] Add build.rs with rerun-git-head to root dir * Add some sanity checks for workers to dockerfiles * Update malus + [X] Make it self-contained + [X] Undo multiple binary changes * Try to fix clippy errors * Address `cargo run` issue - [X] Add default-run for polkadot - [X] Add note about installation to error * Update readme (installation instructions) * Allow disabling external workers for local/testing setups + [X] cli flag to enable single-binary mode + [X] Add message to error * Revert unnecessary Cargo.lock changes * Remove unnecessary build scripts from collators * Add back missing malus commands (should fix failing ZN job) * Some minor fixes * Update Cargo.lock * Fix some build errors * Undo self-contained binaries; cli flag to disable version check + [X] Remove --dont-run-external-workers + [X] Add --disable-worker-version-check + [X] Remove PVF subcommands + [X] Redo malus changes * Try to fix failing job and add some docs for local tests --------- Co-authored-by: Dmitry Sinyavin <dmitry.sinyavin@parity.io> Co-authored-by: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com> Co-authored-by: parity-processbot <>
179 lines
6.3 KiB
YAML
179 lines
6.3 KiB
YAML
# This file is part of .gitlab-ci.yml
|
|
# Here are all jobs that are executed during "build" stage
|
|
|
|
build-linux-stable:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in check.yml
|
|
needs:
|
|
- job: job-starter
|
|
artifacts: false
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
- .compiler-info
|
|
- .collect-artifacts
|
|
variables:
|
|
RUST_TOOLCHAIN: stable
|
|
# Enable debug assertions since we are running optimized builds for testing
|
|
# but still want to have debug assertions.
|
|
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
|
# Ensure we run the UI tests.
|
|
RUN_UI_TESTS: 1
|
|
script:
|
|
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --verbose --bins
|
|
# pack artifacts
|
|
- mkdir -p ./artifacts
|
|
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
|
|
- mv ./target/testnet/polkadot ./artifacts/.
|
|
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
|
|
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
|
|
- pushd artifacts
|
|
- sha256sum polkadot | tee polkadot.sha256
|
|
- shasum -c polkadot.sha256
|
|
- popd
|
|
- EXTRATAG="${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}"
|
|
- echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})"
|
|
- echo -n ${VERSION} > ./artifacts/VERSION
|
|
- echo -n ${EXTRATAG} > ./artifacts/EXTRATAG
|
|
- echo -n ${CI_JOB_ID} > ./artifacts/BUILD_LINUX_JOB_ID
|
|
- RELEASE_VERSION=$(./artifacts/polkadot -V | awk '{print $2}'| awk -F "-" '{print $1}')
|
|
- echo -n "v${RELEASE_VERSION}" > ./artifacts/BUILD_RELEASE_VERSION
|
|
- cp -r scripts/* ./artifacts
|
|
|
|
build-test-collators:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in check.yml
|
|
needs:
|
|
- job: job-starter
|
|
artifacts: false
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
- .compiler-info
|
|
- .collect-artifacts
|
|
script:
|
|
- time cargo build --locked --profile testnet --verbose -p test-parachain-adder-collator
|
|
- time cargo build --locked --profile testnet --verbose -p test-parachain-undying-collator
|
|
# pack artifacts
|
|
- mkdir -p ./artifacts
|
|
- mv ./target/testnet/adder-collator ./artifacts/.
|
|
- mv ./target/testnet/undying-collator ./artifacts/.
|
|
- echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
|
|
- echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
|
|
- echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
|
|
- echo "undying-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
|
|
- cp -r ./scripts/* ./artifacts
|
|
|
|
build-malus:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in check.yml
|
|
needs:
|
|
- job: job-starter
|
|
artifacts: false
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
- .compiler-info
|
|
- .collect-artifacts
|
|
script:
|
|
- time cargo build --locked --profile testnet --verbose -p polkadot-test-malus
|
|
# pack artifacts
|
|
- mkdir -p ./artifacts
|
|
- mv ./target/testnet/malus ./artifacts/.
|
|
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
|
|
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
|
|
- echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
|
|
- echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
|
|
- echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
|
|
- cp -r ./scripts/* ./artifacts
|
|
|
|
build-staking-miner:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in check.yml
|
|
needs:
|
|
- job: job-starter
|
|
artifacts: false
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
- .compiler-info
|
|
- .collect-artifacts
|
|
script:
|
|
- time cargo build --locked --release --package staking-miner
|
|
# pack artifacts
|
|
- mkdir -p ./artifacts
|
|
- mv ./target/release/staking-miner ./artifacts/.
|
|
- echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
|
|
- echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
|
|
- echo "staking-miner = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
|
|
- cp -r ./scripts/* ./artifacts
|
|
|
|
build-rustdoc:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in test.yml
|
|
needs:
|
|
- job: test-deterministic-wasm
|
|
artifacts: false
|
|
extends:
|
|
- .docker-env
|
|
- .test-refs
|
|
variables:
|
|
SKIP_WASM_BUILD: 1
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
|
|
when: on_success
|
|
expire_in: 1 days
|
|
paths:
|
|
- ./crate-docs/
|
|
script:
|
|
# FIXME: it fails with `RUSTDOCFLAGS="-Dwarnings"` and `--all-features`
|
|
# FIXME: return to stable when https://github.com/rust-lang/rust/issues/96937 gets into stable
|
|
- time cargo doc --workspace --verbose --no-deps
|
|
- rm -f ./target/doc/.lock
|
|
- mv ./target/doc ./crate-docs
|
|
# FIXME: remove me after CI image gets nonroot
|
|
- chown -R nonroot:nonroot ./crate-docs
|
|
- echo "<meta http-equiv=refresh content=0;url=polkadot_service/index.html>" > ./crate-docs/index.html
|
|
|
|
build-implementers-guide:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in test.yml
|
|
needs:
|
|
- job: test-deterministic-wasm
|
|
artifacts: false
|
|
extends:
|
|
- .kubernetes-env
|
|
- .test-refs
|
|
- .collect-artifacts-short
|
|
# git depth is set on purpose: https://github.com/paritytech/polkadot/issues/6284
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
GIT_DEPTH: 0
|
|
CI_IMAGE: paritytech/mdbook-utils:e14aae4a-20221123
|
|
script:
|
|
- mdbook build ./roadmap/implementers-guide
|
|
- mkdir -p artifacts
|
|
- mv roadmap/implementers-guide/book artifacts/
|
|
|
|
build-short-benchmark:
|
|
stage: build
|
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
|
# the job can be found in check.yml
|
|
needs:
|
|
- job: job-starter
|
|
artifacts: false
|
|
extends:
|
|
- .docker-env
|
|
- .test-refs
|
|
- .collect-artifacts
|
|
script:
|
|
- cargo build --profile release --locked --features=runtime-benchmarks
|
|
- mkdir artifacts
|
|
- cp ./target/release/polkadot ./artifacts/
|