Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/container-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Containers
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Containers:
# comment out if we're using the cache
runs-on: ubuntu-latest
container: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
os: ['alpine', 'archlinux', 'centos', 'rockylinux', 'opensuse']
include:
- os: alpine
image: alpine:3.23
cflags: -Wno-sign-conversion
- os: archlinux
image: archlinux:base-devel
#-Wno-discarded-qualified needed?
cflags: -Wno-sign-conversion -Wno-discarded-qualifiers
- os: centos
image: quay.io/centos/centos:10
- os: rockylinux
image: quay.io/rockylinux/rockylinux:10
- os: opensuse
image: opensuse/tumbleweed
#needed?
cflags: -Wno-discarded-qualifiers

steps:
- name: Install dependencies
run: |
case ${{ matrix.os }} in
*alpine*)
apk update
apk add git autoconf automake make gcc musl-dev perl bash zlib-dev bzip2-dev xz-dev curl-dev openssl-dev ncurses-dev
;;
*archlinux*)
pacman -Syyu --noconfirm
pacman -Sy --noconfirm base-devel git libdeflate
;;
*centos*)
yum install -y autoconf automake make gcc perl-Data-Dumper zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel git perl-FindBin ncurses-devel
;;
*rockylinux*)
yum install -y autoconf automake make gcc perl-Data-Dumper zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel git perl-FindBin diffutils ncurses-devel
;;
*opensuse*)
zypper --non-interactive install --allow-downgrade --force-resolution git autoconf automake make gcc perl zlib-devel libbz2-devel xz-devel libcurl-devel libopenssl-devel diffutils llvm-clang ncurses-devel bzip2
;;
esac

- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false

- name: Clone htslib
run: |
git config --global --add safe.directory `pwd`
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr

- name: Configure bcftools
run: |
autoreconf -i
./configure --enable-werror CFLAGS="-g -O3 -std=gnu99 ${{ matrix.cflags }}"

- name: Build htslib and bcftools
run: |
make -j5

- name: Test
run: |
make check
4 changes: 4 additions & 0 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Linux CI
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-linux:
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Mac OS CI
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-macos:
runs-on: macos-latest
Expand Down
165 changes: 165 additions & 0 deletions .github/workflows/vm-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: VMs
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# ----------
FreeBSD:
runs-on: ubuntu-latest
strategy:
fail-fast: false
#matrix:
# arch: ['x86_64', 'aarch64']

steps:
- name: Checkout
# This is actions/checkout@v6.0.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
submodules: true
fetch-depth: 1

- name: Clone htslib
run: |
git config --global --add safe.directory `pwd`
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr

- name: Setup VM
# This is vmactions/freebsd-vm@@v1.5.2
uses: vmactions/freebsd-vm@77ed28d336d03fe19a3f4f7266c1d2c4714dd79d
with:
#debug-on-error: true
#vnc-password: ${{ secrets.VNC_PASSWORD }}
#arch: ${{ matrix.arch }}
usesh: true
cpu: 4
prepare: |
pkg update
pkg install -y autoconf automake bash curl bzip2 gmake libdeflate perl5 git

# Inside VM
- name: Configure
shell: freebsd {0}
run: |
(cd htslib; autoreconf -i)
autoreconf -i
./configure --enable-werror CFLAGS="-g -O3 -fsanitize=address,undefined -DHTS_ALLOW_UNALIGNED=0 -Wno-format-truncation -Wno-format-overflow" CPPFLAGS="-I/usr/local/include" LDFLAGS="-fsanitize=address,undefined -L/usr/local/lib -Wl,-R/usr/local/lib"

- name: Build
shell: freebsd {0}
run: |
gmake -j5

- name: Test
shell: freebsd {0}
run: |
gmake check

# ----------
OpenBSD:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout
# This is actions/checkout@v6.0.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
submodules: true
fetch-depth: 1

- name: Clone htslib
run: |
git config --global --add safe.directory `pwd`
mkdir -p htslib
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr

- name: Setup VM
# This is vmactions/openbsd-vm@v1.4.5
uses: vmactions/openbsd-vm@c941015845c0f0c429676840963dc63b226d4f69
with:
usesh: true
cpu: 4
prepare: |
pkg_add autoconf-2.71p0 automake-1.18.1 bash bzip2 curl gmake libdeflate xz git

# Inside VM
- name: Configure
shell: openbsd {0}
run: |
export AUTOCONF_VERSION=2.71
export AUTOMAKE_VERSION=1.18
(cd htslib; autoreconf -i)
autoreconf -i
./configure --enable-werror CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,-R/usr/local/lib"

- name: Build
shell: openbsd {0}
run: |
gmake -j5

- name: Test
shell: openbsd {0}
run: |
gmake check


# ----------
Solaris:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout
# This is actions/checkout@v6.0.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
submodules: true
fetch-depth: 1

- name: Clone htslib
run: |
git config --global --add safe.directory `pwd`
mkdir -p htslib
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr

- name: Setup VM
# This is vmactions/solaris-vm@v1.3.8
uses: vmactions/solaris-vm@315163f088b66e55bbcc45928bd224d4973b2312
with:
release: "11.4-clang-19"
usesh: true
cpu: 4
prepare: |
pkg install autoconf automake bash curl bzip2 git

# Inside VM
- name: Configure
shell: solaris {0}
run: |
(cd htslib; autoreconf -i)
autoreconf -i
# -Wno-char-subscripts turns off errors such as phase.c:460, which are
# false alarms anyway.
./configure --enable-werror CFLAGS="-g -O3 -Wno-char-subscripts"

- name: Build
shell: solaris {0}
run: |
gmake -j5

- name: Test
shell: solaris {0}
run: |
# We need more compliant versions of tr and grep.
PATH=/usr/xpg4/bin:$PATH
export PATH
gmake check
4 changes: 4 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Windows/MinGW-W64 CI
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-windows:
runs-on: windows-latest
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ PACKAGE_VERSION = 1.24
# $(shell), :=, etc are GNU Make-specific. If you don't have GNU Make,
# comment out this conditional.
ifneq "$(wildcard .git)" ""
PACKAGE_VERSION := $(shell git describe --always --dirty)
DOC_VERSION := $(shell git describe --always)+
PACKAGE_VERSION := $(shell git -c safe.directory=`pwd` describe --always --dirty)
DOC_VERSION := $(shell git -c safe.directory=`pwd` describe --always)+
DOC_DATE := $(shell date +'%Y-%m-%d %R %Z')

# Force version.h to be remade if $(PACKAGE_VERSION) has changed.
Expand Down
2 changes: 1 addition & 1 deletion misc/plot-vcfstats
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ sub parse_vcfstats1
my ($opts,$i) = @_;
my $file = $$opts{vcfstats}[$i];
print STDERR "Parsing bcftools stats output: $file\n" unless !$$opts{verbose};
open(my $fh,"gunzip -cfq $file |") or error("gunzip -cfq $file: $!");
open(my $fh,"gunzip -cq $file || cat $file |") or error("gunzip -cfq $file: $!");
my $line = <$fh>;
if ( !$line or !($line=~/^# This file was produced by \S*/) ) { error("Sanity check failed: was this file generated by bcftools stats?"); }
my %dat;
Expand Down
2 changes: 1 addition & 1 deletion test/trio-dnm3/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export LC_ALL=C

for x in *.vcf; do
"$BCFTOOLS" +trio-dnm3 -p 1X:child,dad,mom $x | "$BCFTOOLS" query -uf$x'\t%CHROM:%POS\t%EXP\t[ %DNM]\t[ %VAF]\t[ %AD]\t%REF,%ALT\t[ %VA]\t[ %SP]';
done | sort | sed 's,fp,-, ; s,tp,o,'
done | sort | sed 's/fp/-/;s/tp/o/'

2 changes: 1 addition & 1 deletion version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
VERSION=1.24

# If we have a git clone, then check against the current tag
if [ -e .git ]
if [ -e .git -a "x`which git`" != "x" ]
then
# If we ever get to 10.x this will need to be more liberal
VERSION=`git describe --match '[0-9].[0-9]*' --dirty --always`
Expand Down
Loading