.gitlab-ci.yml 4.27 KB
Newer Older
1 2
variables:
  BUILD_IMAGES_PROJECT: gnutls/build-images
3 4
  FEDORA_BUILD: buildenv-f28
  FEDORA_X86_BUILD: buildenv-f28-x86
5
  GET_SOURCES_ATTEMPTS: "3"
6

7
# See http://doc.gitlab.com/ce/ci/yaml/ for documentation.
8 9
x86-64:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
10
  script:
11
  - git submodule update --init && make autoreconf && ./configure --disable-doc && make -j$(nproc) && make -j$(nproc) check
12 13
  except:
  - tags
14
  tags:
15
  - shared
16 17 18

x86:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_X86_BUILD
19
  script:
20
  - git submodule update --init && make autoreconf &&
21
    PKG_CONFIG_PATH="/usr/lib/pkgconfig/" CFLAGS="-O2 -g -m32" LDFLAGS="-m32" ./configure --build=i686-redhat-linux --target=i686-redhat-linux --disable-doc && make -j$(nproc) && make -j$(nproc) check
22 23 24
  except:
  - tags
  tags:
25
  - shared
26 27 28

clang:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
29
  script:
30
  - git submodule update --init && make autoreconf && CC=clang
31
    ./configure --disable-doc --disable-valgrind-tests && make -j$(nproc) && make check -j$(nproc)
32 33
  except:
  - tags
34 35
  tags:
  - shared
36 37 38

asan:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
39 40
  script:
  - git submodule update --init && make autoreconf && CFLAGS="-fsanitize=address -g
41
    -O2" LDFLAGS="-static-libasan" ./configure --disable-doc --disable-valgrind-tests && make -j$(nproc) && make check -j$(nproc)
42 43
  except:
  - tags
44 45
  tags:
  - shared
46 47 48

ubsan:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
49 50
  script:
  - git submodule update --init && make autoreconf && CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g
51
    -O2" ./configure --disable-doc --disable-valgrind-tests && make -j$(nproc) && make check -j$(nproc)
52
  tags:
53
  - shared
54 55
  except:
  - tags
56

57
MinGW32:
58
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
59 60 61 62 63 64 65 66 67
  script:
  - dnf install -y wine.i686 mingw32-gcc util-linux
  - mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
  - echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
  - make autoreconf && rm -f tests/suite/mini-eagain2.c && mkdir -p build && cd build &&
    mingw32-configure --disable-doc --disable-valgrind-tests &&
    mingw32-make -j$(nproc) && mingw32-make -C tests check -j$(nproc)
  tags:
  - shared
68
  - docker
69 70 71 72 73 74 75 76 77 78
  except:
  - tags
  artifacts:
    expire_in: 1 week
    when: on_failure
    paths:
      - build/*.log
      - build/tests/*.log
      - build/tests/*/*.log

79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
gnutls:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - ./.bootstrap &&
  - ./configure --disable-doc --prefix=/usr --libdir=/usr/lib64 &&
    make -j$(nproc) && make install
  - git clone --depth 1 --branch master https://gitlab.com/gnutls/gnutls.git gnutls-git
  - cd gnutls-git && git submodule update --init && make autoreconf &&
    ./configure --disable-cxx --disable-guile --disable-doc && make -j$(nproc) &&
    make -j $(nproc) check
  tags:
  - shared
  except:
  - tags
  artifacts:
    expire_in: 1 week
    when: on_failure
    paths:
      - gnutls-git/guile/tests/*.log
      - gnutls-git/tests/*.log
      - gnutls-git/*.log
      - gnutls-git/tests/*/*.log
      - gnutls-git/tests/suite/*/*.log

static-analyzers:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - git submodule update --init && make autoreconf
  - scan-build ./configure --disable-doc
  - make -j$(nproc) syntax-check
  - make -j$(nproc) -C gl
  - make -j$(nproc) -C lib ASN1.lo
  - scan-build --status-bugs -o scan-build-lib make -j$(nproc) -C lib
  tags:
  - shared
  except:
  - tags
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145

# Target to run code coverage on non-master branches. That is intended
# to ensure that compilation in master will not break the pages rule.
pages-test:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - git submodule update --init && make autoreconf
  - ./configure --enable-gtk-doc --disable-gcc-warnings
  - make -C doc libtasn1.html libtasn1.pdf
  tags:
  - shared
  except:
    - master

pages:
  image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
  script:
  - git submodule update --init && make autoreconf
  - ./configure --enable-gtk-doc --disable-gcc-warnings
  - mkdir -p public
  - make -C doc libtasn1.html libtasn1.pdf
  - mv doc/libtasn1.pdf doc/libtasn1.html public/index.html
  tags:
  - shared
  artifacts:
    when: on_success
    paths:
      - public
  only:
    - master