Merge branch 'ci-tag-jobs-with-docker' into 'master'

Better CI (run on faster CI hosts, incremental release builds, thin-lto)

See merge request famedly/conduit!118
next
Timo Kösters 2021-07-12 20:35:00 +00:00
commit 0eec1cc696
1 changed files with 9 additions and 0 deletions

View File

@ -9,10 +9,12 @@ variables:
CACHE_COMPRESSION_LEVEL: fastest
test:cargo:
stage: "test"
needs: []
image: "rust:latest"
tags: ["docker"]
variables:
CARGO_HOME: "cargohome"
cache:
@ -43,6 +45,7 @@ test:cargo:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
interruptible: true
image: "rust:latest"
tags: ["docker"]
cache:
paths:
- cargohome
@ -57,6 +60,10 @@ test:cargo:
- "apt-get install -yqq --no-install-recommends $NEEDED_PACKAGES"
- "rustup target add $TARGET"
script:
# Set some cargo tuning here, because targets overwrite the 'variables'
- "export CARGO_INCREMENTAL=true"
- "export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16"
- "export CARGO_PROFILE_RELEASE_LTO=thin"
- time cargo build --target $TARGET --release
- 'mv "target/$TARGET/release/conduit" "conduit-$TARGET"'
artifacts:
@ -103,6 +110,7 @@ build:cargo:aarch64-unknown-linux-gnu:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
interruptible: true
image: "rust:latest"
tags: ["docker"]
cache:
paths:
- cargohome
@ -149,6 +157,7 @@ publish:package:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
image: curlimages/curl:latest
tags: ["docker"]
variables:
GIT_STRATEGY: "none" # Don't need a clean copy of the code, we just operate on artifacts
script: