pipeline update
This commit is contained in:
parent
6dd7c9286c
commit
9cbf2c6913
@ -5,33 +5,74 @@ variables:
|
|||||||
stages:
|
stages:
|
||||||
- clippy
|
- clippy
|
||||||
- test
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
############# Clippy Lint
|
############# Clippy Lint
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
stage: clippy
|
stage: clippy
|
||||||
image: ${BUILD_IMAGE_LINUX_AMD64}
|
image: ${BUILD_IMAGE_LINUX_AMD64}
|
||||||
|
cache:
|
||||||
|
key: $CI_COMMIT_REF_SLUG-linux-amd64-release
|
||||||
|
paths:
|
||||||
|
- target/
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- amd64
|
- amd64
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- target/
|
|
||||||
before_script:
|
|
||||||
- rustup component add clippy
|
|
||||||
script:
|
script:
|
||||||
# - RUSTFLAGS="-D warnings" RUST_BACKTRACE=1 cargo clippy
|
- cargo clippy --release
|
||||||
- RUST_BACKTRACE=1 cargo clippy
|
# Only run clippy on non-protected branches, for development
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_PROTECTED == "false"
|
||||||
|
|
||||||
############# Unit Testing
|
############# Unit Testing
|
||||||
test_linux_amd64:
|
|
||||||
|
.test_rules_common:
|
||||||
|
# Only do tests for tags, protected branches, or merge requests
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
||||||
|
- if: $CI_MERGE_REQUEST_IID
|
||||||
|
|
||||||
|
test_linux_amd64_release:
|
||||||
stage: test
|
stage: test
|
||||||
image: ${BUILD_IMAGE_LINUX_AMD64}
|
image: ${BUILD_IMAGE_LINUX_AMD64}
|
||||||
|
cache:
|
||||||
|
key: $CI_COMMIT_REF_SLUG-linux-amd64-release
|
||||||
|
paths:
|
||||||
|
- target/
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- amd64
|
- amd64
|
||||||
|
script:
|
||||||
|
- RUST_BACKTRACE=1 dbus-run-session -- cargo test --release -- --nocapture
|
||||||
|
rules:
|
||||||
|
- !reference [.test_rules_common, rules]
|
||||||
|
|
||||||
|
############# Build
|
||||||
|
|
||||||
|
.build_rules_common:
|
||||||
|
# Only build for tags or protected branches
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
||||||
|
|
||||||
|
build_linux_amd64_release:
|
||||||
|
stage: build
|
||||||
|
image: ${BUILD_IMAGE_LINUX_AMD64}
|
||||||
cache:
|
cache:
|
||||||
|
key: $CI_COMMIT_REF_SLUG-linux-amd64-release
|
||||||
paths:
|
paths:
|
||||||
- target/
|
- target/
|
||||||
|
tags:
|
||||||
|
- linux
|
||||||
|
- amd64
|
||||||
script:
|
script:
|
||||||
# - RUSTFLAGS="-D warnings" RUST_BACKTRACE=1 dbus-run-session -- cargo test -- --nocapture
|
- cargo build --release
|
||||||
- RUST_BACKTRACE=1 dbus-run-session -- cargo test -- --nocapture
|
artifacts:
|
||||||
|
name: $CI_COMMIT_REF_SLUG-linux-amd64-release
|
||||||
|
paths:
|
||||||
|
- target/release/veilid-cli
|
||||||
|
- target/release/veilid-server
|
||||||
|
rules:
|
||||||
|
- !reference [.build_rules_common, rules]
|
||||||
|
Loading…
Reference in New Issue
Block a user