1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
# copied from Daniel Cook's Seq collection
name: Build
on:
- push
- pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
nimversion:
- stable
- devel
steps:
- uses: actions/checkout@v2
# Caching
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-stable
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-stable
- name: Cache htslib
id: cache-htslib
uses: actions/cache@v1
with:
path: $HOME/htslib
key: ${{ runner.os }}-htslib-1.10
# Install Dependencies
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -qy install bwa make build-essential cmake libncurses-dev ncurses-dev libbz2-dev lzma-dev liblzma-dev \
curl libssl-dev libtool autoconf automake libcurl4-openssl-dev
- name: Install d4
git clone https://github.com/38/d4-format
cd d4-format
cargo build --release
sudo cp ../d4-format/target/release/libd4binding.* /usr/local/lib
sudo cp ./d4binding/include/d4.h /usr/local/include/
# Setup htslib
- name: Install htslib (linux)
if: runner.os == 'Linux'
run: |
cd
git clone --recursive https://github.com/samtools/htslib.git
cd htslib && git checkout 1.10 && autoheader && autoconf && ./configure --enable-libcurl
cd
make -j 4 -C htslib
echo "::set-env name=LD_LIBRARY_PATH::${LD_LIBRARY_PATH}:${HOME}/htslib"
ls -lh $HOME/htslib/*.so
- name: Install hstlib (macos)
if: runner.os == 'macOS'
run: |
brew install htslib
- uses: iffy/install-nim@v1.1
with:
nimversion: ${{ matrix.nimversion }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
# Build and Test
- name: Build test executable
run: nimble build -Y mosdepth.nimble
- name: "Copy binary"
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
- name: Functional Tests
env:
TERM: "xterm"
run: |
bash ./functional-tests.sh
- name: Unit Tests
run: |
nim c -r tests/all.nim
- name: Upload Artifact
if: success()
uses: actions/upload-artifact@v1.0.0
with:
name: mosdepth_${{ matrix.os }}_executable
path: bin/
|