summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-07-18 10:39:28 +0200
committerlouiz’ <louiz@louiz.org>2016-07-23 11:29:40 +0200
commit7cc05ab4967e9fb77b6e4d8ca9800c8625895ad3 (patch)
tree5e0dd36b38e2503fd317929bd479d7fcacec1f9b
parent24824a5015e77aced8adf8afc35b82984e8b84fa (diff)
downloadbiboumi-7cc05ab4967e9fb77b6e4d8ca9800c8625895ad3.tar.gz
biboumi-7cc05ab4967e9fb77b6e4d8ca9800c8625895ad3.tar.bz2
biboumi-7cc05ab4967e9fb77b6e4d8ca9800c8625895ad3.tar.xz
biboumi-7cc05ab4967e9fb77b6e4d8ca9800c8625895ad3.zip
Refactor the CI file, build many configurations
-rw-r--r--.gitlab-ci.yml92
-rw-r--r--docker/biboumi-test/fedora/Dockerfile2
2 files changed, 76 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0be8920..7b797f9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,44 +1,102 @@
-stages:
-- build
-
before_script:
- uname -a
- whoami
- echo $LANG
- g++ --version
- clang++ --version
- - mkdir build
+ - rm -rf build/
+ - mkdir build/
- cd build
-build:fedora:
+variables:
+ COMPILER: "g++"
+ BUILD_TYPE: "Debug"
+ BOTAN: "-DWITH_BOTAN=1"
+ CARES: "-DWITH_CARES=1"
+ SYSTEMD: "-DWITH_SYSTEMD=1"
+ LIBIDN: "-DWITH_LIBIDN=1"
+ LITESQL: "-DWITH_LITESQL=1"
+
+.template:basic_build: &basic_build
stage: build
- image: biboumi-test-fedora:latest
script:
- - cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DWITH_BOTAN=1 -DWITH_CARES=1 -DWITH_SYSTEMD=1 -DWITH_LIBIDN=1 -DWITH_LITESQL=1
+ - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}
- make biboumi -j$(nproc)
- - make coverage -j$(nproc)
- make check -j$(nproc)
- - mkdir tests_outputs && pushd tests_outputs && make e2e -j$(nproc) -C .. && popd
+
+image: biboumi-test-fedora:latest
+
+build:1:
+ variables:
+ BOTAN: "-DWITHOUT_BOTAN=1"
+ <<: *basic_build
+
+build:2:
+ variables:
+ CARES: "-DWITHOUT_CARES=1"
+ <<: *basic_build
+
+build:3:
+ variables:
+ LITESQL: "-DWITHOUT_LITESQL=1"
+ <<: *basic_build
+
+build:4:
+ variables:
+ LITESQL: "-DWITHOUT_LITESQL=1"
+ BOTAN: "-DWITHOUT_BOTAN=1"
+ <<: *basic_build
+
+build:5:
+ variables:
+ LITESQL: "-DWITHOUT_LITESQL=1"
+ CARES: "-DWITHOUT_CARES=1"
+ <<: *basic_build
+
+build:6:
+ variables:
+ BOTAN: "-DWITHOUT_BOTAN=1"
+ CARES: "-DWITHOUT_CARES=1"
+ <<: *basic_build
+
+build:6:
+ variables:
+ LIBIDN: "-DWITHOUT_LIBIDN=1"
+ CARES: "-DWITHOUT_CARES=1"
+ <<: *basic_build
+
+build:rpm:
+ stage: build
+ script:
+ - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}
- make rpm -j$(nproc)
artifacts:
paths:
- - build/coverage/
- build/rpmbuild/RPMS
- build/rpmbuild/SRPMS
- - build/tests_outputs/
when: always
-build:debian:
- stage: build
- image: biboumi-test-debian:latest
+
+.template:basic_test: &basic_test
+ stage: test
script:
- - cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -DWITH_BOTAN=1 -DWITH_CARES=1 -DWITH_SYSTEMD=1 -DWITH_LIBIDN=1 -DWITH_LITESQL=1
+ - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}
- make biboumi -j$(nproc)
- - make coverage -j$(nproc)
- - make check -j$(nproc)
+ - make check
+ - make coverage
- mkdir tests_outputs && pushd tests_outputs && make e2e -j$(nproc) -C .. && popd
artifacts:
paths:
- build/coverage/
- build/tests_outputs/
when: always
+
+test:debian:
+ stage: test
+ image: biboumi-test-debian:latest
+ <<: *basic_test
+
+test:fedora:
+ stage: test
+ image: biboumi-test-fedora:latest
+ <<: *basic_test \ No newline at end of file
diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile
index b199ed2..3c48645 100644
--- a/docker/biboumi-test/fedora/Dockerfile
+++ b/docker/biboumi-test/fedora/Dockerfile
@@ -57,7 +57,7 @@ RUN cd /charybdis && ./autogen.sh && ./configure --prefix=/home/tester/ircd --bi
RUN chown -R tester:tester /home/tester/ircd
RUN rm -rf /charybdis
-RUN su - tester -c "echo export LANG=fr_FR.utf-8 >> /home/tester/.bashrc"
+RUN su - tester -c "echo export LANG=en_GB.utf-8 >> /home/tester/.bashrc"
WORKDIR /home/tester
USER tester