From e3e6fc63f69e355228ee25b9686fa2781aba6e93 Mon Sep 17 00:00:00 2001 From: Kai Kriegel Date: Tue, 15 Feb 2022 00:08:14 +0000 Subject: [PATCH] move deps to global before_script --- .gitlab-ci.yml | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5edebb..6e6e85a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,8 +25,15 @@ stages: # install build dependencies 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 --no-install-recommends capnproto build-essential cmake clang libclang-dev libgsasl7-dev + - 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 libc6-armel-cross libc6-dev-armel-cross gcc-arm-linux-gnueabi g++-arm-linux-gnueabi + - 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 libgsasl7-dev:armel libssl-dev:armel + - rustup target add armv7-unknown-linux-gnueabihf + - rustup target add arm-unknown-linux-gnueabihf - rustup update - rustup component add rustfmt - rustup component add clippy @@ -110,16 +117,6 @@ test:cargo: 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 libc6-armel-cross libc6-dev-armel-cross gcc-arm-linux-gnueabi g++-arm-linux-gnueabi - - 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 - - rustup target add arm-unknown-linux-gnueabihf script: - cargo update - cargo build --release --target arm-unknown-linux-gnueabihf @@ -142,16 +139,6 @@ build:release: stage: build variables: BFFHD_BUILD_TAGGED_RELEASE: 1 - 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 libc6-armel-cross libc6-dev-armel-cross gcc-arm-linux-gnueabi g++-arm-linux-gnueabi - - 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 libgsasl7-dev:armel libssl-dev:armel - - rustup target add armv7-unknown-linux-gnueabihf - - rustup target add arm-unknown-linux-gnueabihf script: - cargo update - cargo build --release --target arm-unknown-linux-gnueabihf @@ -174,8 +161,8 @@ upload:nightly: image: curlimages/curl:latest variables: PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/diflouroborane/nightly" - # rules: - # - if: $CI_COMMIT_TAG + # only: + # - development before_script: - '' script: