Commit efd94c14 authored by Michaël Roynard's avatar Michaël Roynard

Fix build/packaging strategy

parent 56ce5d0f
Pipeline #4161 passed with stages
in 5 minutes and 23 seconds
variables:
CONAN_PROFILE: "gcc7" # profile to use with conan
CC: "gcc-7" # eg. gcc or clang
CXX: "g++-7" # eg. g++ or clang++
# CONAN_PUBLIC_REMOTE_NAME: "lrde-public" # Conan remote name
# CONAN_PUBLIC_REMOTE_URL: "https://artifactory.lrde.epita.fr/artifactory/api/conan/lrde-public" # Conan remote name
# CONAN_PRIVATE_REMOTE_NAME: "lrde-private" # Conan remote name
......@@ -13,44 +15,100 @@ variables:
NAME: "gtest-constexpr-ext" # Conan package name
TAG: "stable" # Conan tag
VERSION: "0.1" # Version to build
CMAKE_GENERATOR: "-G Ninja" # include -G if defined
BUILD_DIRECTORY: "build-in-docker" # build directory name
SOURCE_DIRECTORY: ".." # where cmake search source files from the build directory
TARGET: "check" # target to invoke
TESTS: "ON" # build unit tests
RELEASE_TYPE: "Release" # default release type
stages:
- build
- package
.job-basic-package-linux: &distcheck-basic-package-linux
stage: package
.job-basic-build-linux: &distcheck-basic-build-linux
stage: build
image: mroynard/ubuntu-toolset:stable
script:
- set -e
- export CC=$CC
- export CXX=$CXX
- $CC --version
- $CXX --version
- conan remote add $CONAN_PRIVATE_REMOTE_NAME $CONAN_PRIVATE_REMOTE_URL
- conan user
-p $CONAN_API_KEY
-r $CONAN_PRIVATE_REMOTE_NAME $CONAN_USER
- conan remote list
- conan create
- mkdir -p $BUILD_DIRECTORY
- cd $BUILD_DIRECTORY
- conan install ..
--build missing
-pr $CONAN_PROFILE
. $NAME/$VERSION@$CONAN_USER/$TAG-$CONAN_PROFILE
- cmake -DWITH_TESTS=$TESTS ..
- cmake --build .
--target $TARGET
--config $RELEASE_TYPE
- ctest -C $RELEASE_TYPE
--output-on-failure
--schedule-random
--verbose
distcheck-build-linux-gcc7-release:
<<: *distcheck-basic-build-linux
variables:
distcheck-package-linux-gcc7:
<<: *distcheck-basic-package-linux
distcheck-build-linux-gcc7-debug:
<<: *distcheck-basic-build-linux
variables:
RELEASE_TYPE: "Debug"
distcheck-build-linux-gcc8-release:
<<: *distcheck-basic-build-linux
variables:
CC: "gcc-8"
CXX: "g++-8"
CONAN_PROFILE: "gcc8"
distcheck-package-linux-gcc8:
<<: *distcheck-basic-package-linux
distcheck-build-linux-gcc8-debug:
<<: *distcheck-basic-build-linux
variables:
CC: "gcc-8"
CXX: "g++-8"
CONAN_PROFILE: "gcc8"
RELEASE_TYPE: "Debug"
distcheck-package-linux-clang6:
<<: *distcheck-basic-package-linux
distcheck-build-linux-clang6-release:
<<: *distcheck-basic-build-linux
variables:
CC: "clang-6.0"
CXX: "clang++-6.0"
CONAN_PROFILE: "clang6"
# distcheck-package-linux-clang7:
# <<: *distcheck-basic-package-linux
distcheck-build-linux-clang6-debug:
<<: *distcheck-basic-build-linux
variables:
CC: "clang-6.0"
CXX: "clang++-6.0"
CONAN_PROFILE: "clang6"
RELEASE_TYPE: "Debug"
# distcheck-build-linux-clang7-release:
# <<: *distcheck-basic-build-linux
# variables:
# CC: "clang-7"
# CXX: "clang++-7"
# CONAN_PROFILE: "clang7"
# distcheck-build-linux-clang7-release:
# <<: *distcheck-basic-build-linux
# variables:
# CC: "clang-7"
# CXX: "clang++-7"
# CONAN_PROFILE: "clang7"
# RELEASE_TYPE: "Debug"
distcheck-package-linux-default:
stage: package
image: mroynard/ubuntu-toolset:stable
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment