diff options
author | louiz’ <louiz@louiz.org> | 2016-12-08 00:56:26 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-12-08 00:56:26 +0100 |
commit | dac2119777f46ffdd238e2ee1dd3c09c10892172 (patch) | |
tree | c70fb34d92ed0a8b0408379706052fe80ead4205 | |
parent | 75778f418751bf06687ccc99454683bb43a9daf0 (diff) | |
download | biboumi-dac2119777f46ffdd238e2ee1dd3c09c10892172.tar.gz biboumi-dac2119777f46ffdd238e2ee1dd3c09c10892172.tar.bz2 biboumi-dac2119777f46ffdd238e2ee1dd3c09c10892172.tar.xz biboumi-dac2119777f46ffdd238e2ee1dd3c09c10892172.zip |
CI: refactor, and enable some specific test only on the master project
Because some of the jobs (the one using ssh runners, freebsd and openbsd)
use runners that are only available on my own project and not forks (for
security reasons), and some other jobs (coverity and sonar-qube) use private
variables to be able to run. So, all these jobs would fail if run on a fork
project.
-rw-r--r-- | .gitlab-ci.yml | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d69d302..26b22ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,18 +13,16 @@ variables: SYSTEMD: "-DWITH_SYSTEMD=1" LIBIDN: "-DWITH_LIBIDN=1" LITESQL: "-DWITH_LITESQL=1" - .template:basic_build: &basic_build stage: build + tags: + - docker + image: biboumi-test-fedora:latest script: - "echo Running cmake with the following parameters: -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}" - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL} - make biboumi -j$(nproc || echo 1) - make check -j$(nproc || echo 1) - tags: - - docker - -image: biboumi-test-fedora:latest build:1: variables: @@ -67,9 +65,11 @@ build:6: build:rpm: stage: build - image: biboumi-test-fedora:latest + only: + - master@louiz/biboumi tags: - docker + image: biboumi-test-fedora:latest script: - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL} - make rpm -j$(nproc || echo 1) @@ -83,6 +83,8 @@ build:rpm: .template:basic_test: &basic_test stage: test + tags: + - docker script: - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL} - make biboumi -j$(nproc || echo 1) @@ -98,49 +100,48 @@ build:rpm: name: $CI_PROJECT_NAME-test-$CI_BUILD_ID test:debian: - stage: test image: biboumi-test-debian:latest - tags: - - docker <<: *basic_test test:fedora: - stage: test image: biboumi-test-fedora:latest - tags: - - docker <<: *basic_test test:freebsd: + only: + - master@louiz/biboumi tags: - freebsd variables: - COMPILER: "clang++" SYSTEMD: "-DWITHOUT_SYSTEMD=1" stage: test script: - - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL} + - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL} - make biboumi - make check - make e2e test:openbsd: + stage: test + only: + - master@louiz/biboumi + tags: + - openbsd variables: COMPILER: "g++" SYSTEMD: "-DWITHOUT_SYSTEMD=1" - stage: test script: - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL} - make biboumi - make check - tags: - - openbsd test:coverity: stage: test - image: biboumi-test-fedora:latest + only: + - master@louiz/biboumi tags: - docker + image: biboumi-test-fedora:latest allow_failure: true when: manual script: @@ -152,12 +153,13 @@ test:coverity: test:sonar-qube: stage: test - image: biboumi-test-fedora:latest + only: + - master@louiz/biboumi tags: - docker + image: biboumi-test-fedora:latest script: - cmake .. - ~/sonar-scanner/bin/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir ./bw-outputs make biboumi test_suite - cd .. - ~/sonar-scanner/bin/sonar-scanner -Dsonar.host.url=https://sonarqube.com -Dsonar.login=$SONAR_LOGIN -Dsonar.language=cpp -Dsonar.cfamily.build-wrapper-output=build/bw-outputs -Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=src/,louloulibs/,tests/ -Dsonar.projectKey=biboumi -Dsonar.projectName=Biboumi -Dsonar.projectVersion=3.0 - |