.gitlab-ci.yml 4.48 KB
Newer Older
1 2
variables:
  BUILD_IMAGES_PROJECT: gnutls/build-images
3
  DEBIAN_CROSS_BUILD: buildenv-debian-cross
4 5
  FEDORA_BUILD: buildenv-f29
  DEBIAN_X86_CROSS_BUILD: buildenv-debian-x86-cross
6
  GET_SOURCES_ATTEMPTS: "3"
7

8
# remove any pre-installed headers from nettle
9
before_script:
10
 - yum remove -y nettle-devel
11

Niels Möller's avatar
Niels Möller committed
12
# See http://doc.gitlab.com/ce/ci/yaml/ for documentation.
13
build/x86-64:
14
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
Niels Möller's avatar
Niels Möller committed
15 16
  script:
  - ./.bootstrap &&
17
    ./configure --disable-static --enable-fat --disable-documentation && make -j4 &&
Niels Möller's avatar
Niels Möller committed
18 19
    make check -j4
  tags:
20
  - shared
Niels Möller's avatar
Niels Möller committed
21 22
  except:
  - tags
23
build/mini-gmp:
24
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
25 26 27 28 29
  script:
  - ./.bootstrap &&
    ./configure --disable-documentation --enable-mini-gmp && make -j4 &&
    make check -j4
  tags:
30
  - shared
31 32
  except:
  - tags
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
build/c89:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - ./.bootstrap &&
    ./configure CC='gcc -std=c89' --disable-static --disable-assembler --disable-documentation && make -j4 &&
    make check -j4
  tags:
  - shared
  except:
  - tags
build/ndebug:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - ./.bootstrap &&
    ./configure CPPFLAGS='-DNDEBUG' --disable-static --disable-assembler --disable-documentation && make -j4 &&
    make check -j4
  tags:
  - shared
  except:
  - tags
53
build/ubsan:
54
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
55 56 57 58 59
  script:
  - ./.bootstrap && 
    CXXFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" ./configure 
    --disable-documentation && make -j4 && make check -j4
  tags:
60
  - shared
61 62
  except:
  - tags
63
build/asan:
64
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
65 66 67 68
  script:
  - ./.bootstrap && 
  - CXXFLAGS="-fsanitize=address -g -O2" CFLAGS="-fsanitize=address -g -O2" ./configure --disable-documentation &&
    make -j4 && make check -j4
69 70
  tags:
  - shared
71 72
  except:
  - tags
73
build/static-analyzers:
74
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
75 76 77 78 79 80 81 82 83 84 85 86 87
  script:
  - ./.bootstrap
  - scan-build ./configure --disable-documentation
  - scan-build --status-bugs -o scan-build-lib make -j$(nproc)
  tags:
  - shared
  except:
  - tags
  artifacts:
    expire_in: 1 week
    when: on_failure
    paths:
      - scan-build-lib/*
88 89 90 91 92 93 94
build/gnutls:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - ./.bootstrap &&
  - ./configure --disable-documentation --prefix=/usr --libdir=/usr/lib64 &&
    make -j4 && make install
  - git clone --depth 1 --branch master https://gitlab.com/gnutls/gnutls.git gnutls-git
95
  - cd gnutls-git && git submodule update --init && ./bootstrap &&
96
    ./configure --disable-gost --disable-cxx --disable-guile --disable-doc && make -j$(nproc) &&
97 98 99 100 101
    make -j $(nproc) check
  tags:
  - shared
  except:
  - tags
102
  artifacts:
103 104
    expire_in: 1 week
    when: on_failure
Niels Möller's avatar
Niels Möller committed
105
    paths:
106 107 108 109 110
      - gnutls-git/guile/tests/*.log
      - gnutls-git/tests/*.log
      - gnutls-git/*.log
      - gnutls-git/tests/*/*.log
      - gnutls-git/tests/suite/*/*.log
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
Debian.cross.x86:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_X86_CROSS_BUILD
  before_script:
  - apt-get remove -y nettle-dev:i386
  script:
  - build=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
  - host=i686-linux-gnu
  - export CC_FOR_BUILD="gcc"
  - export CC="$host-gcc"
  - ./.bootstrap &&
    CFLAGS="-O2 -g" ./configure --build=$build --host=$host --enable-fat --disable-documentation && make -j4 &&
    make check -j4
  tags:
  - shared
  except:
  - tags
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
.Debian.cross.template: &Debian_cross_template
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_CROSS_BUILD
  before_script:
  # remove any previously installed nettle headers to avoid conflicts
  - for arch in armhf mips arm64;do apt-get remove -y nettle-dev:$arch;done
  script:
  - build=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
  - host="${CI_JOB_NAME#*.cross.}"
  # not setting CC_FOR_BUILD paired with qemu-user/binfmt somehow causes
  # config.guess to detect the target as the build platform and not activate
  # cross-compile mode even though --build is given
  - export CC_FOR_BUILD="gcc"
  - export CC="$host-gcc"
  - ./.bootstrap
  - ./configure --disable-static --enable-fat --disable-documentation --build=$build --host=$host
  - make -j$(nproc)
  - make -j$(nproc) check
  tags:
  - shared
  except:
  - tags
Debian.cross.arm-linux-gnueabihf:
  <<: *Debian_cross_template
Debian.cross.mips-linux-gnu:
  <<: *Debian_cross_template
Debian.cross.aarch64-linux-gnu:
  <<: *Debian_cross_template