Skip to content

Commit e1de6b4

Browse files
committed
fix build.yml
1 parent be00d6f commit e1de6b4

3 files changed

Lines changed: 20 additions & 17 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-18.04, macos-10.15]
15-
nimversion:
15+
version:
1616
- stable
1717
- devel
1818

@@ -48,7 +48,7 @@ jobs:
4848
run: |
4949
sudo apt-get update
5050
sudo apt-get -qy install bwa make build-essential cmake libncurses-dev ncurses-dev libbz2-dev lzma-dev liblzma-dev \
51-
curl libssl-dev libtool autoconf automake libcurl4-openssl-dev
51+
curl libssl-dev libtool autoconf automake libcurl4-openssl-dev zlib1g-dev
5252
5353
# Setup htslib
5454
- name: Install htslib (linux)
@@ -57,28 +57,31 @@ jobs:
5757
cd
5858
git clone --recursive https://github.com/samtools/htslib.git
5959
cd htslib && git checkout 1.11 && autoheader && autoconf && ./configure --enable-libcurl
60-
cd
61-
make -j 4 -C htslib install
62-
echo "::set-env name=LD_LIBRARY_PATH::${LD_LIBRARY_PATH}:${HOME}/htslib"
63-
ls -lh $HOME/htslib/*.so
60+
sudo make -j 4 install
61+
sudo ldconfig
62+
#echo "::set-env name=LD_LIBRARY_PATH::${LD_LIBRARY_PATH}:${HOME}/htslib"
63+
#ls -lh $HOME/htslib/*.so
64+
65+
- name: Install hstlib (macos)
66+
if: runner.os == 'macOS'
67+
run: |
68+
brew install htslib
6469
6570
- name: Install d4
66-
export HTSLIB=system
71+
run: |
72+
#export HTSLIB=system
6773
git clone https://github.com/38/d4-format
6874
cd d4-format
69-
cargo build --release
75+
cargo build --release --all-features
76+
cd d4binding/ && cargo build --release && cd ..
7077
sudo cp ../d4-format/target/release/libd4binding.* /usr/local/lib
7178
sudo cp ./d4binding/include/d4.h /usr/local/include/
79+
sudo (ldconfig || true)
7280
7381
74-
- name: Install hstlib (macos)
75-
if: runner.os == 'macOS'
76-
run: |
77-
brew install htslib
78-
79-
- uses: iffy/install-nim@v1.1
82+
- uses: iffy/install-nim@v4.1.1
8083
with:
81-
nimversion: ${{ matrix.nimversion }}
84+
version: ${{ matrix.version }}
8285

8386
- uses: actions-rs/toolchain@v1
8487
with:

depthstat.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ proc add*[T](c: var CountStat, value: T) {.inline.} =
1818
if value.int > c.counts.high.int:
1919
c.counts[c.counts.high].inc
2020
elif value < 0:
21-
raise newException(IndexError, "error setting negative depth value:" & $value)
21+
raise newException(IndexDefect, "error setting negative depth value:" & $value)
2222
else:
2323
c.counts[value].inc
2424

mosdepth.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ proc threshold_args*(ts: string): seq[int] =
765765

766766

767767
proc check_cram_has_ref(cram_path: string, fasta:string) =
768-
if fasta != "" and exists_file(fasta):
768+
if fasta != "" and fileExists(fasta):
769769
return
770770
if cram_path.ends_with(".cram"):
771771
stderr.write_line("[mosdepth] ERROR: specify a reference file (or set REF_PATH env var) for decoding CRAM")

0 commit comments

Comments
 (0)