diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d870e7..789e3cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,8 +60,8 @@ jobs: if: runner.os == 'Linux' run: | cd - git clone --recursive https://github.com/samtools/htslib.git - cd htslib && git checkout 1.11 && autoheader && autoconf && ./configure --enable-libcurl + git clone -b 1.18 --recursive https://github.com/samtools/htslib.git + cd htslib && autoheader && autoconf && ./configure --enable-libcurl sudo make -j 4 install sudo ldconfig #echo "::set-env name=LD_LIBRARY_PATH::${LD_LIBRARY_PATH}:${HOME}/htslib" @@ -101,7 +101,7 @@ jobs: run: chmod +x mosdepth && mkdir bin && cp mosdepth bin/mosdepth_debug_${{ matrix.os }} - name: "Build and Copy release binary" - run: nim c -d:danger -d:release -o:bin/mosdepth_${{ matrix.os }} mosdepth + run: nim c --mm:refc -d:danger -d:release -o:bin/mosdepth_${{ matrix.os }} mosdepth - name: Functional Tests env: diff --git a/functional-tests.sh b/functional-tests.sh index 1addd30..c206b57 100755 --- a/functional-tests.sh +++ b/functional-tests.sh @@ -12,8 +12,8 @@ set -o nounset set -e -nim c --boundChecks:on -x:on mosdepth.nim -nim c -r tests/funcs.nim +nim c --boundChecks:on -x:on -d:useSysAssert -d:useGcAssert --lineDir:on --debuginfo --mm:refc mosdepth.nim +nim c -x:on --mm:refc -d:useSysAssert -d:useGcAssert --lineDir:on --debuginfo -r tests/funcs.nim set +e exe=./mosdepth bam=/data/human/NA12878.subset.bam diff --git a/mosdepth.nim b/mosdepth.nim index adef13c..5a59c8a 100644 --- a/mosdepth.nim +++ b/mosdepth.nim @@ -504,7 +504,8 @@ proc write_thresholds(fh:BGZI, tid:int, arr:var coverage_t, thresholds:seq[int], return var counts = new_seq[int](len(thresholds)) - shallow(arr) + when NimMajor < 2: + shallow(arr) # iterate over the region and count bases >= request cutoffs. for v in arr[start..= 0.3.22", "docopt == 0.7.0", "nim >= 1.0.0", "https://github.com/brentp/d4-nim >= 0.0.3" +requires "hts >= 0.3.22", "docopt == 0.7.1", "nim >= 1.0.0", "https://github.com/brentp/d4-nim >= 0.0.3" bin = @["mosdepth"] skipDirs = @["tests"]