diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e06f53..0339a4f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 @@ -132,6 +131,33 @@ build:binary: tags: - 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 @@ -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: