|
| 1 | +# Note we have a maximum of 16 CPUs available, so adjust our |
| 2 | +# builds so we can start all concurrently without needing to schedule. |
| 3 | + |
| 4 | +# Sadly though there is still a finite limit to macOS of one instance. |
| 5 | +# Can we cull our Mac test to just one instance? |
| 6 | + |
| 7 | +timeout_in: 20m |
| 8 | + |
| 9 | +#-------------------------------------------------- |
| 10 | +# Template: build libdeflate dependency |
| 11 | + |
| 12 | +libdeflate_template: &LIBDEFLATE |
| 13 | + libdeflate_script: | |
| 14 | + if test "x$USE_LIBDEFLATE" == "xyes"; then |
| 15 | + pushd "$HOME" |
| 16 | + git clone --depth 1 https://github.com/ebiggers/libdeflate.git |
| 17 | + pushd libdeflate |
| 18 | + make -j 4 CFLAGS='-fPIC -O3' libdeflate.a |
| 19 | + popd |
| 20 | + popd |
| 21 | + fi |
| 22 | +
|
| 23 | +#-------------------------------------------------- |
| 24 | +# Template: compile and test |
| 25 | + |
| 26 | +compile_template: &COMPILE |
| 27 | + compile_script: | |
| 28 | + git submodule update --init --recursive |
| 29 | + if test "x$USE_LIBDEFLATE" = "xyes"; then |
| 30 | + CONFIG_OPTS='CPPFLAGS="-I$HOME/libdeflate" LDFLAGS="$LDFLAGS -L$HOME/libdeflate" --with-libdeflate' |
| 31 | + else |
| 32 | + CONFIG_OPTS='--without-libdeflate' |
| 33 | + fi |
| 34 | + if test "$USE_CONFIG" = "yes"; then |
| 35 | + MAKE_OPTS= |
| 36 | + autoreconf -i |
| 37 | + eval ./configure --enable-plugins --enable-werror $CONFIG_OPTS CFLAGS=\"-g -O3 $CFLAGS\" || \ |
| 38 | + ( cat config.log; false ) |
| 39 | + else |
| 40 | + MAKE_OPTS=-e |
| 41 | + fi |
| 42 | + if test "x$DO_MAINTAINER_CHECKS" = "xyes"; then |
| 43 | + make maintainer-check |
| 44 | + fi |
| 45 | + make -j 4 $MAKE_OPTS |
| 46 | +
|
| 47 | +test_template: &TEST |
| 48 | + test_script: | |
| 49 | + make test-shlib-exports |
| 50 | + make test |
| 51 | +
|
| 52 | +
|
| 53 | +#-------------------------------------------------- |
| 54 | +# Task: linux builds. |
| 55 | + |
| 56 | +# Debian + latest GCC |
| 57 | +gcc_task: |
| 58 | + name: debian-gcc |
| 59 | + container: |
| 60 | + image: gcc:latest |
| 61 | + cpu: 2 |
| 62 | + memory: 1G |
| 63 | + |
| 64 | + environment: |
| 65 | + LC_ALL: C |
| 66 | + CIRRUS_CLONE_DEPTH: 1 |
| 67 | + |
| 68 | + matrix: |
| 69 | + - environment: |
| 70 | + DO_MAINTAINER_CHECKS: yes |
| 71 | + USE_CONFIG: no |
| 72 | + - environment: |
| 73 | + USE_CONFIG: yes |
| 74 | + CFLAGS: -std=c99 -pedantic |
| 75 | + USE_LIBDEFLATE: yes |
| 76 | + |
| 77 | + << : *LIBDEFLATE |
| 78 | + << : *COMPILE |
| 79 | + << : *TEST |
| 80 | + |
| 81 | + |
| 82 | +# Ubuntu + Clang |
| 83 | +ubuntu_task: |
| 84 | + name: ubuntu-clang |
| 85 | + container: |
| 86 | + #image: ubuntu:latest # use << : *LIBDEFLATE |
| 87 | + image: ubuntu:devel |
| 88 | + cpu: 2 |
| 89 | + memory: 1G |
| 90 | + |
| 91 | + environment: |
| 92 | + CC: clang |
| 93 | + LC_ALL: C |
| 94 | + CIRRUS_CLONE_DEPTH: 1 |
| 95 | + |
| 96 | + matrix: |
| 97 | + - environment: |
| 98 | + USE_CONFIG: yes |
| 99 | + - environment: |
| 100 | + USE_CONFIG: yes |
| 101 | + CFLAGS: -g -Wall -O3 -fsanitize=address |
| 102 | + LDFLAGS: -fsanitize=address |
| 103 | + USE_LIBDEFLATE: yes |
| 104 | + |
| 105 | + # NB: we could consider building a docker image with these |
| 106 | + # preinstalled and specifying that instead, to speed up testing. |
| 107 | + install_script: | |
| 108 | + apt-get update |
| 109 | + apt-get install -y --no-install-suggests --no-install-recommends \ |
| 110 | + ca-certificates clang libc-dev make git autoconf automake \ |
| 111 | + zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev \ |
| 112 | + libdeflate-dev |
| 113 | +
|
| 114 | + << : *COMPILE |
| 115 | + << : *TEST |
| 116 | + |
| 117 | + |
| 118 | +# CentOS |
| 119 | +centos_task: |
| 120 | + name: centos-gcc |
| 121 | + container: |
| 122 | + image: centos:latest |
| 123 | + cpu: 2 |
| 124 | + memory: 1G |
| 125 | + |
| 126 | + environment: |
| 127 | + LC_ALL: C |
| 128 | + CIRRUS_CLONE_DEPTH: 1 |
| 129 | + USE_CONFIG: yes |
| 130 | + |
| 131 | + # NB: we could consider building a docker image with these |
| 132 | + # preinstalled and specifying that instead, to speed up testing. |
| 133 | + install_script: | |
| 134 | + yum install -y autoconf automake make gcc perl-Data-Dumper zlib-devel \ |
| 135 | + bzip2 bzip2-devel xz-devel curl-devel openssl-devel ncurses-devel \ |
| 136 | + diffutils git |
| 137 | +
|
| 138 | + << : *COMPILE |
| 139 | + << : *TEST |
| 140 | + |
| 141 | +#-------------------------------------------------- |
| 142 | +# Task: macOS builds |
| 143 | + |
| 144 | +macosx_task: |
| 145 | + name: macosx + clang |
| 146 | + osx_instance: |
| 147 | + image: catalina-base |
| 148 | + |
| 149 | + environment: |
| 150 | + CC: clang |
| 151 | + LC_ALL: C |
| 152 | + CIRRUS_CLONE_DEPTH: 1 |
| 153 | + |
| 154 | + matrix: |
| 155 | + - environment: |
| 156 | + USE_CONFIG: no |
| 157 | + - environment: |
| 158 | + USE_CONFIG: yes |
| 159 | + USE_LIBDEFLATE: yes |
| 160 | + |
| 161 | + package_install_script: |
| 162 | + - HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool xz git |
| 163 | + |
| 164 | + << : *LIBDEFLATE |
| 165 | + << : *COMPILE |
| 166 | + << : *TEST |
| 167 | + |
0 commit comments