mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
123 lines
4.2 KiB
YAML
123 lines
4.2 KiB
YAML
# This file is part of .gitlab-ci.yml
|
|
# Here are all jobs that are executed during "build" stage
|
|
|
|
# PIPELINE_SCRIPTS_TAG can be found in the project variables
|
|
|
|
.check-dependent-project:
|
|
stage: build
|
|
extends:
|
|
- .docker-env
|
|
- .test-refs-no-trigger-prs-only
|
|
script:
|
|
- git clone
|
|
--depth=1
|
|
"--branch=$PIPELINE_SCRIPTS_TAG"
|
|
https://github.com/paritytech/pipeline-scripts
|
|
- ./pipeline-scripts/check_dependent_project.sh
|
|
--org paritytech
|
|
--dependent-repo "$DEPENDENT_REPO"
|
|
--github-api-token "$GITHUB_PR_TOKEN"
|
|
--extra-dependencies "$EXTRA_DEPENDENCIES"
|
|
--companion-overrides "$COMPANION_OVERRIDES"
|
|
|
|
# Individual jobs are set up for each dependent project so that they can be ran in parallel.
|
|
# Arguably we could generate a job for each companion in the PR's description using Gitlab's
|
|
# parent-child pipelines but that's more complicated.
|
|
|
|
check-dependent-polkadot:
|
|
extends: .check-dependent-project
|
|
variables:
|
|
DEPENDENT_REPO: polkadot
|
|
COMPANION_OVERRIDES: |
|
|
substrate: polkadot-v*
|
|
polkadot: release-v*
|
|
|
|
# TODO: Re-enable after https://github.com/paritytech/pipeline-scripts/issues/44
|
|
#check-dependent-cumulus:
|
|
# extends: .check-dependent-project
|
|
# variables:
|
|
# DEPENDENT_REPO: cumulus
|
|
# EXTRA_DEPENDENCIES: polkadot
|
|
# COMPANION_OVERRIDES: |
|
|
# substrate: polkadot-v*
|
|
# polkadot: release-v*
|
|
|
|
build-linux-substrate:
|
|
stage: build
|
|
extends:
|
|
- .collect-artifacts
|
|
- .docker-env
|
|
- .build-refs
|
|
needs:
|
|
- job: test-linux-stable
|
|
artifacts: false
|
|
before_script:
|
|
- mkdir -p ./artifacts/substrate/
|
|
script:
|
|
- WASM_BUILD_NO_COLOR=1 time cargo build --release --verbose
|
|
- mv ./target/release/substrate ./artifacts/substrate/.
|
|
- echo -n "Substrate version = "
|
|
- if [ "${CI_COMMIT_TAG}" ]; then
|
|
echo "${CI_COMMIT_TAG}" | tee ./artifacts/substrate/VERSION;
|
|
else
|
|
./artifacts/substrate/substrate --version |
|
|
cut -d ' ' -f 2 | tee ./artifacts/substrate/VERSION;
|
|
fi
|
|
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
|
|
- cp -r ./scripts/ci/docker/substrate.Dockerfile ./artifacts/substrate/
|
|
- printf '\n# building node-template\n\n'
|
|
- ./scripts/ci/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz
|
|
|
|
.build-subkey:
|
|
stage: build
|
|
extends:
|
|
- .collect-artifacts
|
|
- .docker-env
|
|
- .build-refs
|
|
needs:
|
|
- job: cargo-check-subkey
|
|
artifacts: false
|
|
before_script:
|
|
- mkdir -p ./artifacts/subkey
|
|
script:
|
|
- cd ./bin/utils/subkey
|
|
- SKIP_WASM_BUILD=1 time cargo build --release --verbose
|
|
- cd -
|
|
- mv ./target/release/subkey ./artifacts/subkey/.
|
|
- echo -n "Subkey version = "
|
|
- ./artifacts/subkey/subkey --version |
|
|
sed -n -E 's/^subkey ([0-9.]+.*)/\1/p' |
|
|
tee ./artifacts/subkey/VERSION;
|
|
- sha256sum ./artifacts/subkey/subkey | tee ./artifacts/subkey/subkey.sha256
|
|
- cp -r ./scripts/ci/docker/subkey.Dockerfile ./artifacts/subkey/
|
|
|
|
build-subkey-linux:
|
|
extends: .build-subkey
|
|
|
|
build-subkey-macos:
|
|
extends: .build-subkey
|
|
tags:
|
|
- osx
|
|
|
|
build-rustdoc:
|
|
stage: build
|
|
extends:
|
|
- .docker-env
|
|
- .test-refs
|
|
variables:
|
|
SKIP_WASM_BUILD: 1
|
|
DOC_INDEX_PAGE: "sc_service/index.html" # default redirected page
|
|
artifacts:
|
|
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
|
|
when: on_success
|
|
expire_in: 7 days
|
|
paths:
|
|
- ./crate-docs/
|
|
script:
|
|
- time cargo +nightly doc --workspace --all-features --verbose
|
|
- 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=${DOC_INDEX_PAGE}>" > ./crate-docs/index.html
|