.gitlab-ci.yml 3.15 KB
Newer Older
1 2 3
stages:
  - build

4
debS_clang:
Wuttke, Joachim's avatar
Wuttke, Joachim committed
5 6
  tags: &unix
  - Linux
7
  image: debian:stable
8
  before_script: &debian_clang
9 10
    - apt-get -y update
    - apt-get -y upgrade
11
    - apt-get -y install cmake clang perl
12 13 14 15 16 17 18 19
  stage: build
  script: &scr
    - mkdir build
    - cd build
    - cmake -DWERROR=ON ..
    - make
    - ctest --output-on-failure

20
debS_gcc:
Wuttke, Joachim's avatar
Wuttke, Joachim committed
21
  tags: *unix
22
  image: debian:stable
23
  before_script: &debian_gcc
24 25
    - apt-get -y update
    - apt-get -y upgrade
26
    - apt-get -y install cmake g++ perl
27 28 29
  stage: build
  script: *scr

30
debT_clang:
31 32
  tags: *unix
  image: debian:testing
33
  before_script: *debian_clang
34 35 36
  stage: build
  script: *scr

37
debT_gcc:
38 39
  tags: *unix
  image: debian:testing
40 41 42 43 44 45 46
  before_script: *debian_gcc
  stage: build
  script: *scr

debU_clang:
  tags: *unix
  image: debian:unstable
47 48 49 50
  before_script: *debian_clang
  stage: build
  script: *scr

51
debU_gcc:
52 53
  tags: *unix
  image: debian:unstable
54 55 56 57
  before_script: *debian_gcc
  stage: build
  script: *scr

58
suse_clang:
59
  tags: *unix
60 61 62 63 64 65 66 67 68
  image: opensuse/tumbleweed
  # rolling release with infinite life time
  before_script:
    - zypper -n patch || echo "do it again"
    - zypper -n patch
    - zypper -n ref
    - zypper -n up
    - zypper -n dup
    - zypper -n in cmake perl
Wuttke, Joachim's avatar
Wuttke, Joachim committed
69 70
    - zypper -n in clang gcc glibc-devel
    - export CC=/usr/bin/clang
71 72 73
  stage: build
  script: *scr

74
suse_gcc:
75 76 77 78 79 80 81 82 83
  tags: *unix
  image: opensuse/tumbleweed
  # rolling release with infinite life time
  before_script:
    - zypper -n patch || echo "do it again"
    - zypper -n patch
    - zypper -n ref
    - zypper -n up
    - zypper -n dup
84 85
    - zypper -n in cmake perl
    - zypper -n in gcc-c++
86 87 88 89 90 91
  stage: build
  script: *scr

# suse_stable:
#  opensuse:leap, unsupported here because it is at cmake 3.5, while libcerf requires 3.6

92 93 94 95 96 97 98 99
centos7_clang:
  tags: *unix
  image: centos:centos7
  before_script:
    - yum -y update
    - yum -y install epel-release
    - yum repolist
    - yum -y install make cmake3 perl
Wuttke, Joachim's avatar
Wuttke, Joachim committed
100 101
    - yum -y install clang gcc glibc-devel
    - export CC=/usr/bin/clang
102 103 104 105 106 107 108 109 110 111
    - cmake3 --version
    - ctest3 --version
    - cpack3 --version
    - ln -s /usr/bin/cmake3 /usr/bin/cmake
    - ln -s /usr/bin/ctest3 /usr/bin/ctest
    - ln -s /usr/bin/cpack3 /usr/bin/cpack
  stage: build
  script: *scr

centos7_gcc:
112 113 114 115 116 117
  tags: *unix
  image: centos:centos7
  before_script:
    - yum -y update
    - yum -y install epel-release
    - yum repolist
118 119
    - yum -y install make cmake3 perl
    - yum -y install gcc-c++
120 121 122 123 124 125 126 127 128
    - cmake3 --version
    - ctest3 --version
    - cpack3 --version
    - ln -s /usr/bin/cmake3 /usr/bin/cmake
    - ln -s /usr/bin/ctest3 /usr/bin/ctest
    - ln -s /usr/bin/cpack3 /usr/bin/cpack
  stage: build
  script: *scr

Wuttke, Joachim's avatar
Wuttke, Joachim committed
129 130 131 132 133 134 135
windows:
  tags:
  - Windows
  stage: build
  script:
    - New-Item -ItemType "directory" -Confirm:$false -Force:$true -Name "build"
    - cd build
136
    # We want to compile with MinGW. Somehow this is accompished by Ninja.
137
    - cmake -G "Ninja" -DLIB_MAN=OFF -DCMAKE_INSTALL_PREFIX=C:\opt\x64 -B. ..
Wuttke, Joachim's avatar
rv  
Wuttke, Joachim committed
138
    - cmake --build . # --config Release
Wuttke, Joachim's avatar
Wuttke, Joachim committed
139 140 141 142 143 144
    - Get-Location
    - dir
    - ctest --output-on-failure # -C Release
    - cmake --install .
  artifacts:
    paths:
Wuttke, Joachim's avatar
Wuttke, Joachim committed
145 146
    - lib/kww.h
    - build/lib/libkww.dll
Wuttke, Joachim's avatar
Wuttke, Joachim committed
147
    expire_in: 1 week