mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
change (ci): new CI image; -Dwarnings instead of a job (#110)
Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
+7
-35
@@ -9,16 +9,15 @@ stages:
|
|||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
|
|
||||||
variables:
|
variables: &default-vars
|
||||||
GIT_STRATEGY: fetch
|
GIT_STRATEGY: fetch
|
||||||
GIT_DEPTH: 3
|
GIT_DEPTH: 3
|
||||||
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
|
|
||||||
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
|
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
|
|
||||||
.docker-env: &docker-env
|
.docker-env: &docker-env
|
||||||
image: parity/rust-builder:latest
|
image: paritytech/ci-linux:production
|
||||||
before_script:
|
before_script:
|
||||||
- cargo -vV
|
- cargo -vV
|
||||||
- rustc -vV
|
- rustc -vV
|
||||||
@@ -57,38 +56,11 @@ test-linux-stable:
|
|||||||
stage: test
|
stage: test
|
||||||
<<: *docker-env
|
<<: *docker-env
|
||||||
variables:
|
variables:
|
||||||
|
<<: *default-vars
|
||||||
# Enable debug assertions since we are running optimized builds for testing
|
# Enable debug assertions since we are running optimized builds for testing
|
||||||
# but still want to have debug assertions.
|
# but still want to have debug assertions.
|
||||||
RUSTFLAGS: -Cdebug-assertions=y
|
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
|
||||||
script:
|
script:
|
||||||
- time cargo test --all --release --locked |
|
- time cargo test --all --release --locked
|
||||||
tee output.log
|
- time cargo test --release -- --ignored integration_test
|
||||||
- time cargo test --release -- --ignored integration_test |
|
|
||||||
tee -a output.log
|
|
||||||
- sccache -s
|
- sccache -s
|
||||||
after_script:
|
|
||||||
- echo "___Collecting warnings for check_warnings job___"
|
|
||||||
- awk '/^warning:/,/^$/ { print }' output.log > ${CI_COMMIT_SHORT_SHA}_warnings.log
|
|
||||||
artifacts:
|
|
||||||
name: $CI_COMMIT_SHORT_SHA
|
|
||||||
expire_in: 24 hrs
|
|
||||||
paths:
|
|
||||||
- ${CI_COMMIT_SHORT_SHA}_warnings.log
|
|
||||||
|
|
||||||
#### stage: build
|
|
||||||
|
|
||||||
check_warnings:
|
|
||||||
stage: build
|
|
||||||
<<: *docker-env
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
dependencies:
|
|
||||||
- test-linux-stable
|
|
||||||
script:
|
|
||||||
- if [ -s ${CI_COMMIT_SHORT_SHA}_warnings.log ]; then
|
|
||||||
cat ${CI_COMMIT_SHORT_SHA}_warnings.log;
|
|
||||||
exit 1;
|
|
||||||
else
|
|
||||||
echo "___No warnings___";
|
|
||||||
fi
|
|
||||||
allow_failure: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user