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: cancel old piplines #639

Merged
merged 19 commits into from
May 24, 2024
37 changes: 37 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
.check_skip_rust:
before_script:
- |-
if echo "$CI_COMMIT_TITLE" | grep -q "ci-skip-rust"; then
echo "Skipping rust tests due to commit title"
exit 0
fi

.check_skip_integration_tests:
before_script:
- |-
if echo "$CI_COMMIT_TITLE" | grep -q "ci-skip-integration-tests"; then
echo "Skipping integration tests due to commit title"
exit 0
fi

workflow:
auto_cancel:
on_new_commit: interruptible


stages:
- test
- build

clippy-and-docs:
extends: .check_skip_rust
interruptible: true
timeout: 2 hours
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
Expand All @@ -11,6 +34,8 @@ clippy-and-docs:
- RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps --locked

fmt:
interruptible: true
extends: .check_skip_rust
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
Expand All @@ -19,20 +44,26 @@ fmt:
- taplo fmt --check

test:
interruptible: true
extends: .check_skip_rust
timeout: 2 hours
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
- cargo test --all --all-targets --locked

test-features:
extends: .check_skip_rust
interruptible: true
timeout: 2 hours
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
script:
- cargo test --all --all-features --all-targets --locked

integration-tests:
extends: .check_skip_integration_tests
interruptible: true
timeout: 30 minutes
image: paritytech/ci-unified:bullseye-1.70.0
stage: test
Expand All @@ -50,6 +81,8 @@ integration-tests:

# TODO: The try-runtime-cli executable could be built as part of the Docker image directly, saving some time.
test-try-runtime:
extends: .check_skip_rust
interruptible: true
parallel:
matrix:
- RUNTIME: "peregrine"
Expand All @@ -69,6 +102,7 @@ test-try-runtime:
- ./try-runtime --runtime ./target/release/wbuild/${RUNTIME}-runtime/${RUNTIME}_runtime.compact.compressed.wasm on-runtime-upgrade --disable-spec-version-check --checks=all live --uri=${ENDPOINT}

build:
interruptible: true
timeout: 2 hours
image:
name: kiltprotocol/kilt-ci:2.7.31
Expand Down Expand Up @@ -100,6 +134,7 @@ build:
- "if [[ ! -z ${CI_COMMIT_TAG} && ! -z ${CI_COMMIT_TAG##*-rc*} && ! -z ${CI_COMMIT_TAG##*dev-*} ]]; then ./.maintain/push-image.sh build latest; fi"

build-wasm-peregrine:
interruptible: true
image:
name: paritytech/srtool:1.70.0
entrypoint: [""]
Expand Down Expand Up @@ -128,6 +163,7 @@ build-wasm-peregrine:
expire_in: 12 week

build-wasm-spiritnet:
interruptible: true
image:
name: paritytech/srtool:1.70.0
entrypoint: [""]
Expand Down Expand Up @@ -156,6 +192,7 @@ build-wasm-spiritnet:
expire_in: 12 week

build-wasm-try-runtime:
interruptible: true
parallel:
matrix:
- RUNTIME: "peregrine"
Expand Down