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.
This commit is contained in:
+22
-20
@@ -13,18 +13,16 @@ variables:
|
|||||||
SYSTEMD: "-DWITH_SYSTEMD=1"
|
SYSTEMD: "-DWITH_SYSTEMD=1"
|
||||||
LIBIDN: "-DWITH_LIBIDN=1"
|
LIBIDN: "-DWITH_LIBIDN=1"
|
||||||
LITESQL: "-DWITH_LITESQL=1"
|
LITESQL: "-DWITH_LITESQL=1"
|
||||||
|
|
||||||
.template:basic_build: &basic_build
|
.template:basic_build: &basic_build
|
||||||
stage: build
|
stage: build
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
image: biboumi-test-fedora:latest
|
||||||
script:
|
script:
|
||||||
- "echo Running cmake with the following parameters: -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}"
|
- "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}
|
- cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}
|
||||||
- make biboumi -j$(nproc || echo 1)
|
- make biboumi -j$(nproc || echo 1)
|
||||||
- make check -j$(nproc || echo 1)
|
- make check -j$(nproc || echo 1)
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
image: biboumi-test-fedora:latest
|
|
||||||
|
|
||||||
build:1:
|
build:1:
|
||||||
variables:
|
variables:
|
||||||
@@ -67,9 +65,11 @@ build:6:
|
|||||||
|
|
||||||
build:rpm:
|
build:rpm:
|
||||||
stage: build
|
stage: build
|
||||||
image: biboumi-test-fedora:latest
|
only:
|
||||||
|
- master@louiz/biboumi
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
image: biboumi-test-fedora:latest
|
||||||
script:
|
script:
|
||||||
- cmake .. -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 rpm -j$(nproc || echo 1)
|
- make rpm -j$(nproc || echo 1)
|
||||||
@@ -83,6 +83,8 @@ build:rpm:
|
|||||||
|
|
||||||
.template:basic_test: &basic_test
|
.template:basic_test: &basic_test
|
||||||
stage: test
|
stage: test
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
script:
|
script:
|
||||||
- cmake .. -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 biboumi -j$(nproc || echo 1)
|
||||||
@@ -98,49 +100,48 @@ build:rpm:
|
|||||||
name: $CI_PROJECT_NAME-test-$CI_BUILD_ID
|
name: $CI_PROJECT_NAME-test-$CI_BUILD_ID
|
||||||
|
|
||||||
test:debian:
|
test:debian:
|
||||||
stage: test
|
|
||||||
image: biboumi-test-debian:latest
|
image: biboumi-test-debian:latest
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
<<: *basic_test
|
<<: *basic_test
|
||||||
|
|
||||||
test:fedora:
|
test:fedora:
|
||||||
stage: test
|
|
||||||
image: biboumi-test-fedora:latest
|
image: biboumi-test-fedora:latest
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
<<: *basic_test
|
<<: *basic_test
|
||||||
|
|
||||||
test:freebsd:
|
test:freebsd:
|
||||||
|
only:
|
||||||
|
- master@louiz/biboumi
|
||||||
tags:
|
tags:
|
||||||
- freebsd
|
- freebsd
|
||||||
variables:
|
variables:
|
||||||
COMPILER: "clang++"
|
|
||||||
SYSTEMD: "-DWITHOUT_SYSTEMD=1"
|
SYSTEMD: "-DWITHOUT_SYSTEMD=1"
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
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 biboumi
|
||||||
- make check
|
- make check
|
||||||
- make e2e
|
- make e2e
|
||||||
|
|
||||||
test:openbsd:
|
test:openbsd:
|
||||||
|
stage: test
|
||||||
|
only:
|
||||||
|
- master@louiz/biboumi
|
||||||
|
tags:
|
||||||
|
- openbsd
|
||||||
variables:
|
variables:
|
||||||
COMPILER: "g++"
|
COMPILER: "g++"
|
||||||
SYSTEMD: "-DWITHOUT_SYSTEMD=1"
|
SYSTEMD: "-DWITHOUT_SYSTEMD=1"
|
||||||
stage: test
|
|
||||||
script:
|
script:
|
||||||
- cmake .. -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
|
- make biboumi
|
||||||
- make check
|
- make check
|
||||||
tags:
|
|
||||||
- openbsd
|
|
||||||
|
|
||||||
test:coverity:
|
test:coverity:
|
||||||
stage: test
|
stage: test
|
||||||
image: biboumi-test-fedora:latest
|
only:
|
||||||
|
- master@louiz/biboumi
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
image: biboumi-test-fedora:latest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
when: manual
|
when: manual
|
||||||
script:
|
script:
|
||||||
@@ -152,12 +153,13 @@ test:coverity:
|
|||||||
|
|
||||||
test:sonar-qube:
|
test:sonar-qube:
|
||||||
stage: test
|
stage: test
|
||||||
image: biboumi-test-fedora:latest
|
only:
|
||||||
|
- master@louiz/biboumi
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
image: biboumi-test-fedora:latest
|
||||||
script:
|
script:
|
||||||
- cmake ..
|
- cmake ..
|
||||||
- ~/sonar-scanner/bin/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir ./bw-outputs make biboumi test_suite
|
- ~/sonar-scanner/bin/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir ./bw-outputs make biboumi test_suite
|
||||||
- cd ..
|
- 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
|
- ~/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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user