.gitlab-ci.yml 2.28 KB
Newer Older
louiz’'s avatar
louiz’ committed
1
before_script:
louiz’'s avatar
louiz’ committed
2 3 4
  - uname -a
  - whoami
  - echo $LANG
louiz’'s avatar
louiz’ committed
5 6
  - g++ --version
  - clang++ --version
7 8
  - rm -rf build/
  - mkdir build/
9
  - cd build
louiz’'s avatar
louiz’ committed
10

11 12 13 14 15 16 17 18 19 20
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
louiz’'s avatar
louiz’ committed
21
  stage: build
louiz’'s avatar
louiz’ committed
22
  script:
23
    - "echo Running cmake with the following parameters: -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}"
24
    - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}
louiz’'s avatar
louiz’ committed
25
    - make biboumi -j$(nproc)
louiz’'s avatar
louiz’ committed
26
    - make check -j$(nproc)
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

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}
louiz’'s avatar
louiz’ committed
73
    - make rpm -j$(nproc)
louiz’'s avatar
louiz’ committed
74 75
  artifacts:
    paths:
76 77
      - build/rpmbuild/RPMS
      - build/rpmbuild/SRPMS
louiz’'s avatar
louiz’ committed
78
    when: always
79

80 81 82

.template:basic_test: &basic_test
  stage: test
83
  script:
84
    - cmake .. -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${BOTAN} ${CARES} ${SYSTEMD} ${LIBIDN} ${LITESQL}
85
    - make biboumi -j$(nproc)
86 87
    - make check
    - make coverage
88 89 90 91
    - mkdir tests_outputs && pushd tests_outputs && make e2e -j$(nproc) -C .. && popd
  artifacts:
    paths:
      - build/coverage/
louiz’'s avatar
louiz’ committed
92 93
      - build/tests_outputs/
    when: always
94 95 96 97 98 99 100 101 102 103

test:debian:
  stage: test
  image: biboumi-test-debian:latest
  <<: *basic_test

test:fedora:
  stage: test
  image: biboumi-test-fedora:latest
  <<: *basic_test