|
| 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: 10m |
| 8 | + |
| 9 | +#-------------------------------------------------- |
| 10 | +# Template: htslib clone & build |
| 11 | +# |
| 12 | +# We try to clone htslib using the same branch name and owner as this |
| 13 | +# bcftools branch. If it exists, it's likely the user is making a |
| 14 | +# joint bcftools+htslib PR and wants both checked in unison. |
| 15 | +# Failing that we use samtools/htslib:develop. |
| 16 | +# Note this only works on the users own forks. Once in the samtools |
| 17 | +# organisation the branch name becomes pull/<num>. |
| 18 | + |
| 19 | +# Logic for choosing which to use is in the .ci_helpers/clone script. |
| 20 | +# Note we could also use "clone_script" if we want to replace the bcftools |
| 21 | +# clone with our own commands too. |
| 22 | +clone_template: &HTSLIB_CLONE |
| 23 | + htslib_clone_script: | |
| 24 | + .ci_helpers/clone "git://github.com/${CIRRUS_REPO_OWNER}/htslib" "${HTSDIR}" "${CIRRUS_BRANCH}" |
| 25 | +
|
| 26 | +
|
| 27 | +#-------------------------------------------------- |
| 28 | +# Template: bcftools compile and test |
| 29 | + |
| 30 | +compile_template: &COMPILE |
| 31 | + << : *HTSLIB_CLONE |
| 32 | + |
| 33 | + compile_script: | |
| 34 | + if test "$USE_CONFIG" = "yes"; then |
| 35 | + (cd $HTSDIR && autoreconf -i) |
| 36 | + autoreconf -i |
| 37 | + ./configure --enable-werror || (cat config.log; /bin/false) |
| 38 | + make -j3 |
| 39 | + else |
| 40 | + make -j3 plugindir=$CIRRUS_WORKING_DIR/plugins -e |
| 41 | + fi |
| 42 | +
|
| 43 | +test_template: &TEST |
| 44 | + test_script: | |
| 45 | + make -e test |
| 46 | +
|
| 47 | +
|
| 48 | +#-------------------------------------------------- |
| 49 | +# Task: linux builds. |
| 50 | + |
| 51 | +# Debian + latest GCC |
| 52 | +gcc_task: |
| 53 | + name: debian-gcc |
| 54 | + container: |
| 55 | + image: gcc:latest |
| 56 | + cpu: 1 |
| 57 | + memory: 1G |
| 58 | + |
| 59 | + environment: |
| 60 | + LC_ALL: C |
| 61 | + CIRRUS_CLONE_DEPTH: 1 |
| 62 | + HTSDIR: ./htslib |
| 63 | + |
| 64 | + matrix: |
| 65 | + - environment: |
| 66 | + USE_CONFIG: no |
| 67 | + - environment: |
| 68 | + USE_CONFIG: yes |
| 69 | + CFLAGS: -std=gnu99 -O0 |
| 70 | + |
| 71 | + << : *COMPILE |
| 72 | + << : *TEST |
| 73 | + |
| 74 | + |
| 75 | +# Ubuntu + Clang |
| 76 | +ubuntu_task: |
| 77 | + name: ubuntu-clang |
| 78 | + container: |
| 79 | + image: ubuntu:devel |
| 80 | + cpu: 2 |
| 81 | + memory: 1G |
| 82 | + |
| 83 | + environment: |
| 84 | + CC: clang |
| 85 | + LC_ALL: C |
| 86 | + CIRRUS_CLONE_DEPTH: 1 |
| 87 | + HTSDIR: ./htslib |
| 88 | + |
| 89 | + matrix: |
| 90 | + - environment: |
| 91 | + USE_CONFIG: no |
| 92 | + - container: |
| 93 | + memory: 2G |
| 94 | + environment: |
| 95 | + USE_CONFIG: yes |
| 96 | + CFLAGS: -g -Wall -O3 -fsanitize=address |
| 97 | + LDFLAGS: -fsanitize=address -Wl,-rpath,`pwd`/inst/lib |
| 98 | + |
| 99 | + # NB: we could consider building a docker image with these |
| 100 | + # preinstalled and specifying that instead, to speed up testing. |
| 101 | + install_script: | |
| 102 | + apt-get update |
| 103 | + apt-get install -y --no-install-suggests --no-install-recommends \ |
| 104 | + ca-certificates clang git autoconf automake \ |
| 105 | + make zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev \ |
| 106 | + libssl-dev libdeflate-dev libncurses5-dev |
| 107 | +
|
| 108 | + << : *COMPILE |
| 109 | + << : *TEST |
| 110 | + |
| 111 | + |
| 112 | +# CentOS |
| 113 | +centos_task: |
| 114 | + name: centos-gcc |
| 115 | + container: |
| 116 | + image: centos:latest |
| 117 | + cpu: 2 |
| 118 | + memory: 1G |
| 119 | + |
| 120 | + environment: |
| 121 | + LC_ALL: C |
| 122 | + CIRRUS_CLONE_DEPTH: 1 |
| 123 | + HTSDIR: ./htslib |
| 124 | + USE_CONFIG: yes |
| 125 | + |
| 126 | + # NB: we could consider building a docker image with these |
| 127 | + # preinstalled and specifying that instead, to speed up testing. |
| 128 | + install_script: | |
| 129 | + yum install -y autoconf automake make gcc perl-Data-Dumper zlib-devel \ |
| 130 | + bzip2 bzip2-devel xz-devel curl-devel openssl-devel ncurses-devel \ |
| 131 | + git diffutils |
| 132 | +
|
| 133 | + << : *COMPILE |
| 134 | + << : *TEST |
| 135 | + |
| 136 | + |
| 137 | +#-------------------------------------------------- |
| 138 | +# Task: macOS builds |
| 139 | + |
| 140 | +macosx_task: |
| 141 | + name: macosx + clang |
| 142 | + osx_instance: |
| 143 | + image: catalina-base |
| 144 | + |
| 145 | + environment: |
| 146 | + CC: clang |
| 147 | + LC_ALL: C |
| 148 | + CIRRUS_CLONE_DEPTH: 1 |
| 149 | + HTSDIR: ./htslib |
| 150 | + |
| 151 | + matrix: |
| 152 | + - environment: |
| 153 | + USE_CONFIG: no |
| 154 | + - environment: |
| 155 | + USE_CONFIG: yes |
| 156 | + |
| 157 | + package_install_script: |
| 158 | + - HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool xz |
| 159 | + |
| 160 | + << : *COMPILE |
| 161 | + << : *TEST |
0 commit comments