From 006374aef827b046b056f307d4f86c18a3d83037 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Sep 2022 12:04:00 +0200 Subject: [PATCH] Force system binaries on alpine --- .gitlab-ci.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18f106a..f357c99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,9 @@ stages: - package - release -.backend_base: +build_backend_glibc: stage: build + image: reg.gitlab.mattv.de/root/docker-images/ubuntu_build_base:latest script: - SRC="$PWD" - TMP=$(mktemp -d) @@ -16,25 +17,35 @@ stages: - VCPKG_DEFAULT_BINARY_CACHE=$SRC/vcpkg_cache cmake -B build -S backend -DCMAKE_TOOLCHAIN_FILE=$TMP/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release - cmake --build build - cp build/backend server - artifacts: - paths: - - server - -build_backend_glibc: - extends: .backend_base - image: reg.gitlab.mattv.de/root/docker-images/ubuntu_build_base:latest cache: key: backend_glibc paths: - vcpkg_cache + artifacts: + paths: + - server build_backend_muslc: - extends: .backend_base + stage: build image: reg.gitlab.mattv.de/root/docker-images/alpine_build_base:latest + script: + - SRC="$PWD" + - TMP=$(mktemp -d) + - cd $TMP + - git clone https://github.com/Microsoft/vcpkg.git . + - ./bootstrap-vcpkg.sh -disableMetrics + - cd $SRC + - mkdir -p vcpkg_cache + - VCPKG_FORCE_SYSTEM_BINARIES=1 VCPKG_DEFAULT_BINARY_CACHE=$SRC/vcpkg_cache cmake -B build -S backend -DCMAKE_TOOLCHAIN_FILE=$TMP/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release + - cmake --build build + - cp build/backend server cache: key: backend_muslc paths: - vcpkg_cache + artifacts: + paths: + - server test_and_build_frontend: image: node:latest