Update .gitlab-ci.yml

This commit is contained in:
Kai Kriegel 2022-01-05 20:39:51 +00:00
parent 222111895d
commit e2f859326a

View File

@ -107,13 +107,12 @@ test:cargo:
# - linux
# - docker
build:binary:
build:nightly:
image: rust:latest
stage: build
before_script:
- cp cargo-cross-config /usr/local/cargo/config
- dpkg --add-architecture armhf
- dpkg --add-architecture armel
- apt-get update -y
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y --no-install-recommends capnproto build-essential cmake clang libclang-dev libgsasl7-dev libgsasl7-dev:armhf libssl-dev:armhf
@ -133,6 +132,33 @@ build:binary:
- linux
- docker
build:release:
image: rust:latest
stage: build
variables:
BFFHD_BUILD_TAGGED_RELEASE: 1
before_script:
- cp cargo-cross-config /usr/local/cargo/config
- dpkg --add-architecture armhf
- apt-get update -y
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- apt-get install -o dir::cache::archives="$APT_CACHE_DIR" -y --no-install-recommends capnproto build-essential cmake clang libclang-dev libgsasl7-dev libgsasl7-dev:armhf libssl-dev:armhf
- rustup target add armv7-unknown-linux-gnueabihf
script:
- cargo update
- cargo build --release --target armv7-unknown-linux-gnueabihf
- cargo build --release --target x86_64-unknown-linux-gnu
artifacts:
paths:
- target/armv7-unknown-linux-gnueabihf/release
- target/x86_64-unknown-linux-gnu/release
rules:
- if: $CI_COMMIT_TAG
tags:
- linux
- docker
upload:nightly:
stage: upload
image: curlimages/curl:latest
@ -143,6 +169,8 @@ upload:nightly:
before_script:
- ''
script:
- |
curl --request DELETE --header "JOB-TOKEN: ${CI_JOB_TOKEN}" "${PACKAGE_REGISTRY_URL}"
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file target/armv7-unknown-linux-gnueabihf/release/diflouroborane "${PACKAGE_REGISTRY_URL}/diflouroborane-linux-armv7-nightly"
- |
@ -151,7 +179,7 @@ upload:nightly:
- linux
- docker
upload:releases:
upload:release:
stage: upload
image: curlimages/curl:latest
variables: