Skip to content

Commit 0949c4d

Browse files
committed
Release 1.22
2 parents bcf6c62 + bf5fc6e commit 0949c4d

File tree

208 files changed

+10593
-1049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+10593
-1049
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version: 'vers.{build}'
77
branches:
88
except:
99
- gh-pages
10+
- /.*/ # Appveyor builds are currently disabled.
1011

1112
# Do not build on tags (GitHub and BitBucket)
1213
skip_tags: true

.ci_helpers/clone

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,25 @@
55
# omitted or if there is no branch with that name, checks out origin/HEAD
66
# from the samtools/htslib repository.
77

8-
repository=$1
9-
localdir=$2
10-
branch=$3
8+
echo CLONE: ${@+"$@"}
9+
10+
owner=$1
11+
repository="https://github.com/$owner/$2"
12+
localdir=$3
13+
branch=$4
14+
htslib_PR=$5
1115

1216
ref=''
1317
[ -n "$branch" ] && ref=$(git ls-remote --heads "$repository" "$branch" 2>/dev/null)
1418
[ -z "$ref" ] && repository='https://github.com/samtools/htslib.git'
1519

1620
set -x
17-
git clone --recurse-submodules --shallow-submodules --depth=1 ${ref:+--branch="$branch"} "$repository" "$localdir"
21+
git clone --recurse-submodules --shallow-submodules --depth=2 ${ref:+--branch="$branch"} "$repository" "$localdir"
22+
23+
# NB: "samtools" as the owner/organisation, not the repo name
24+
if [ "x$owner" = "xsamtools" -a -z "$ref" -a "x$htslib_PR" != "x" ]
25+
then
26+
cd "$localdir"
27+
git fetch origin "pull/$htslib_PR/head"
28+
git checkout FETCH_HEAD
29+
fi

.cirrus.yml

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@ timeout_in: 10m
2121
# clone with our own commands too.
2222
clone_template: &HTSLIB_CLONE
2323
htslib_clone_script: |
24-
.ci_helpers/clone "https://github.com/${CIRRUS_REPO_OWNER}/htslib" "${HTSDIR}" "${CIRRUS_BRANCH}"
25-
24+
# Tricky, but when run as a PR Cirrus-CI obscures the branch name and
25+
# replaces it by pull/<num>. This means we can't automatically get PRs
26+
# to test whether the user has a similarly named branch to compiler and
27+
# test against.
28+
#
29+
# Instead if we add htslib#NUM into the first line of the commit then
30+
# we will use that PR from htslib instead. This is only needed when
31+
# making a PR, so for development prior to the PR being made the
32+
# CIRRUS_BRANCH will be used in preference.
33+
.ci_helpers/clone ${CIRRUS_REPO_OWNER} htslib "${HTSDIR}" "${CIRRUS_BRANCH}" `printenv CIRRUS_CHANGE_TITLE | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
2634
2735
#--------------------------------------------------
2836
# Template: bcftools compile and test
@@ -34,16 +42,34 @@ compile_template: &COMPILE
3442
if test "$USE_CONFIG" = "yes"; then
3543
(cd $HTSDIR && autoreconf -i)
3644
autoreconf -i
37-
./configure --enable-werror || (cat config.log; /bin/false)
45+
./configure --enable-werror $CONFIG_OPTS \
46+
${CC:+CC="$CC"} \
47+
${CFLAGS:+CFLAGS="$CFLAGS"} \
48+
${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
49+
${LDFLAGS:+LDFLAGS="$LDFLAGS"} \
50+
|| (cat config.log; /bin/false)
3851
make -j3
3952
else
40-
make -j3 plugindir=$CIRRUS_WORKING_DIR/plugins -e
53+
make -j3 plugindir="$CIRRUS_WORKING_DIR/plugins" \
54+
${HTSDIR:+HTSDIR="$HTSDIR"} \
55+
${CC:+CC="$CC"} \
56+
${CFLAGS:+CFLAGS="$CFLAGS"} \
57+
${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
58+
${LDFLAGS:+LDFLAGS="$LDFLAGS"}
4159
fi
4260
4361
test_template: &TEST
4462
test_script: |
45-
make -e test
46-
63+
if test "$USE_CONFIG" = "yes"; then
64+
make test
65+
else
66+
make test \
67+
${HTSDIR:+HTSDIR="$HTSDIR"} \
68+
${CC:+CC="$CC"} \
69+
${CFLAGS:+CFLAGS="$CFLAGS"} \
70+
${CPPFLAGS:+CPPFLAGS="$CPPFLAGS"} \
71+
${LDFLAGS:+LDFLAGS="$LDFLAGS"}
72+
fi
4773
4874
#--------------------------------------------------
4975
# Task: linux builds.
@@ -60,15 +86,23 @@ gcc_task:
6086
LC_ALL: C
6187
CIRRUS_CLONE_DEPTH: 1
6288
HTSDIR: ./htslib
63-
CFLAGS: -fsanitize=address
64-
LDFLAGS: -fsanitize=address
6589

6690
matrix:
6791
- environment:
6892
USE_CONFIG: no
93+
CFLAGS: -g -Og -Wall -Werror -fsanitize=address
94+
LDFLAGS: -fsanitize=address
6995
- environment:
7096
USE_CONFIG: yes
71-
CFLAGS: -std=gnu99 -O0
97+
CONFIG_OPTS: --enable-libgsl --enable-perl-filters
98+
CFLAGS: -std=gnu99 -g -Og -Wall -fsanitize=address
99+
LDFLAGS: -fsanitize=address
100+
101+
install_script: |
102+
apt-get update
103+
apt-get install -y --no-install-suggests --no-install-recommends \
104+
libdeflate-dev libperl-dev libgsl0-dev libio-pty-perl
105+
72106
73107
<< : *COMPILE
74108
<< : *TEST
@@ -84,18 +118,19 @@ ubuntu_task:
84118

85119
environment:
86120
CC: clang
87-
CFLAGS: -g -O2 -Werror -Wall -Wformat -Wformat=2
88121
LC_ALL: C
89122
CIRRUS_CLONE_DEPTH: 1
90123
HTSDIR: ./htslib
91124

92125
matrix:
93126
- environment:
94127
USE_CONFIG: no
128+
CFLAGS: -g -O2 -Werror -Wall -Wformat -Wformat=2
95129
- container:
96130
memory: 2G
97131
environment:
98132
USE_CONFIG: yes
133+
CONFIG_OPTS: --enable-libgsl --enable-perl-filters
99134
CFLAGS: -g -Wall -O3
100135
LDFLAGS: -Wl,-rpath,`pwd`/inst/lib
101136

@@ -106,7 +141,7 @@ ubuntu_task:
106141
apt-get install -y --no-install-suggests --no-install-recommends \
107142
ca-certificates clang git autoconf automake \
108143
make zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev \
109-
libssl-dev libdeflate-dev
144+
libssl-dev libdeflate-dev libperl-dev libgsl0-dev libio-pty-perl
110145
111146
<< : *COMPILE
112147
<< : *TEST
@@ -125,13 +160,14 @@ rockylinux_task:
125160
CIRRUS_CLONE_DEPTH: 1
126161
HTSDIR: ./htslib
127162
USE_CONFIG: yes
163+
CONFIG_OPTS: --enable-libgsl --enable-perl-filters
128164

129165
# NB: we could consider building a docker image with these
130166
# preinstalled and specifying that instead, to speed up testing.
131167
install_script: |
132168
yum install -y autoconf automake make gcc perl-Data-Dumper perl-FindBin \
133169
zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel \
134-
git diffutils
170+
git diffutils gsl-devel perl-ExtUtils-Embed
135171
136172
<< : *COMPILE
137173
<< : *TEST
@@ -143,7 +179,7 @@ rockylinux_task:
143179
macosx_task:
144180
name: macosx + clang
145181
macos_instance:
146-
image: ghcr.io/cirruslabs/macos-ventura-base:latest
182+
image: ghcr.io/cirruslabs/macos-runner:sonoma
147183

148184
environment:
149185
CC: clang

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@
1010
.git* export-ignore
1111
.ci_helpers export-ignore
1212
README.md export-ignore
13+
14+
# Prevent Windows cr-lf endings.
15+
test/** -text
16+
test/**.c text
17+
test/**.h text
18+
test/**.pl text
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Windows/MinGW-W64 CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: windows-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
with:
11+
ref: ${{ github.event.pull_request.head.sha }}
12+
- name: Set up MSYS2 MinGW-W64
13+
uses: msys2/setup-msys2@v2
14+
with:
15+
msystem: mingw64
16+
update: false
17+
install: >-
18+
mingw-w64-x86_64-toolchain
19+
mingw-w64-x86_64-autotools
20+
mingw-w64-x86_64-curl
21+
mingw-w64-x86_64-libdeflate
22+
mingw-w64-x86_64-tools-git
23+
mingw-w64-x86_64-zlib
24+
mingw-w64-x86_64-bzip2
25+
mingw-w64-x86_64-xz
26+
- name: Clone htslib
27+
shell: msys2 {0}
28+
run: |
29+
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin"
30+
export MSYSTEM=MINGW64
31+
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
32+
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr
33+
pushd .
34+
cd htslib
35+
autoreconf -i
36+
popd
37+
- name: Compile bcftools
38+
shell: msys2 {0}
39+
run: |
40+
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin"
41+
export MSYSTEM=MINGW64
42+
autoheader
43+
autoconf -Wno-syntax
44+
./configure --enable-werror
45+
make -j4
46+
- name: Check bcftools
47+
shell: msys2 {0}
48+
run: |
49+
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin"
50+
export MSYSTEM=MINGW64
51+
make check
52+

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Alphabetical list of people who have made contributions:
99
Javier Herrero
1010
Warren Kretzschmar <[email protected]>
1111
Heng Li
12+
Pierre Lindenbaum
1213
Shane McCarthy <[email protected]>
1314
John Marshall <[email protected]>
1415
Joel Martin

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ OBJS = main.o vcfindex.o tabix.o \
4141
vcfcnv.o vcfhead.o HMM.o consensus.o ploidy.o bin.o hclust.o version.o \
4242
regidx.o smpl_ilist.o csq.o vcfbuf.o \
4343
mpileup.o bam2bcf.o bam2bcf_indel.o bam2bcf_iaux.o bam2bcf_edlib.o \
44-
read_consensus.o bam_sample.o \
44+
read_consensus.o bam_sample.o \
4545
vcfsort.o cols.o extsort.o dist.o abuf.o \
46-
ccall.o em.o prob1.o kmin.o str_finder.o gff.o edlib.o
46+
ccall.o em.o prob1.o kmin.o str_finder.o gff.o edlib.o \
47+
mpileup2/mpileup.o
4748
PLUGIN_OBJS = vcfplugin.o
4849

4950
prefix = /usr/local
@@ -105,7 +106,7 @@ endif
105106

106107
include config.mk
107108

108-
PACKAGE_VERSION = 1.21
109+
PACKAGE_VERSION = 1.22
109110

110111
# If building from a Git repository, replace $(PACKAGE_VERSION) with the Git
111112
# description of the working tree: either a release tag with the same value
@@ -195,7 +196,10 @@ libbcftools.a: $(OBJS)
195196

196197
vcfplugin.o: EXTRA_CPPFLAGS += -DPLUGINPATH='"$(pluginpath)"'
197198

198-
%.dll %.cygdll: %.c version.h version.c libbcftools.a $(HTSLIB_DLL)
199+
%.dll: %.c version.h version.c libbcftools.a $(HTSLIB_DLL)
200+
$(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(LDFLAGS) -o $@ version.c $< $(PLUGIN_LIBS)
201+
202+
%.cygdll: %.c version.h version.c libbcftools.a $(HTSLIB_DLL)
199203
$(CC) $(PLUGIN_FLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(LDFLAGS) -o $@ version.c $< $(PLUGIN_LIBS)
200204

201205
%.so: %.c version.h version.c
@@ -239,6 +243,7 @@ bam_sample_h = bam_sample.h $(htslib_sam_h)
239243
cigar_state_h = cigar_state.h $(htslib_hts_h) $(htslib_sam_h)
240244
read_consensus_h = read_consensus.h $(htslib_hts_h) $(htslib_sam_h)
241245
str_finder_h = str_finder.h utlist.h
246+
mpileup2_mpileup_h = mpileup2/mpileup.h $(htslib_sam_h)
242247

243248
str_finder.o: str_finder.c $(str_finder_h) utlist.h
244249
main.o: main.c $(htslib_hts_h) config.h version.h $(bcftools_h)
@@ -283,13 +288,14 @@ cols.o: cols.c cols.h
283288
regidx.o: regidx.c $(htslib_hts_h) $(htslib_kstring_h) $(htslib_kseq_h) $(htslib_khash_str2int_h) regidx.h
284289
consensus.o: consensus.c $(htslib_vcf_h) $(htslib_kstring_h) $(htslib_synced_bcf_reader_h) $(htslib_kseq_h) $(htslib_bgzf_h) regidx.h $(bcftools_h) rbuf.h $(filter_h) $(smpl_ilist_h)
285290
mpileup.o: mpileup.c $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) $(htslib_khash_str2int_h) $(htslib_hts_os_h) regidx.h $(bcftools_h) $(bam2bcf_h) $(bam_sample_h) $(gvcf_h)
291+
mpileup2/mpileup.o: mpileup2/mpileup.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) regidx.h $(mpileup2_mpileup_h) $(bam_sample_h)
286292
bam2bcf.o: bam2bcf.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_kstring_h) $(htslib_kfunc_h) $(bam2bcf_h) mw.h
287293
bam2bcf_indel.o: bam2bcf_indel.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_khash_str2int_h) $(bam2bcf_h) $(htslib_ksort_h) $(str_finder_h)
288294
bam2bcf_iaux.o: bam2bcf_iaux.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_khash_str2int_h) $(bcftools_h) $(bam2bcf_h) $(htslib_ksort_h) $(read_consensus_h) $(cigar_state_h)
289295
bam2bcf_edlib.o: bam2bcf_edlib.c $(htslib_hts_h) $(htslib_sam_h) $(htslib_khash_str2int_h) $(bam2bcf_h) $(str_finder_h) $(htslib_ksort_h) edlib.h
290296
read_consensus.o: read_consensus.c $(read_consensus_h) $(cigar_state_h) $(bcftools_h) kheap.h
291297
bam_sample.o: bam_sample.c $(htslib_hts_h) $(htslib_kstring_h) $(htslib_khash_str2int_h) $(khash_str2str_h) $(bam_sample_h) $(bcftools_h)
292-
version.o: version.h version.c
298+
version.o: version.c $(htslib_hts_h) $(bcftools_h) version.h
293299
hclust.o: hclust.c $(htslib_hts_h) $(htslib_kstring_h) $(bcftools_h) hclust.h
294300
HMM.o: HMM.c $(htslib_hts_h) HMM.h
295301
vcfbuf.o: vcfbuf.c $(htslib_vcf_h) $(htslib_vcfutils_h) $(htslib_hts_os_h) $(htslib_kbitset_h) $(bcftools_h) $(vcfbuf_h) rbuf.h
@@ -354,7 +360,7 @@ install: $(PROGRAMS) $(PLUGINS)
354360
$(INSTALL_PROGRAM) plugins/*$(PLUGIN_EXT) $(DESTDIR)$(plugindir)
355361

356362
clean: testclean clean-plugins
357-
-rm -f gmon.out *.o *.a *~ $(PROGRAMS) version.h
363+
-rm -f gmon.out *.o mpileup2/*.o *.a *~ $(PROGRAMS) version.h
358364
-rm -rf *.dSYM test/*.dSYM
359365

360366
clean-plugins:

0 commit comments

Comments
 (0)