From 505b9467db4bfe86778a095262eb52adda85c271 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 23 Sep 2022 14:07:31 +0300 Subject: [PATCH 1/2] Add CI for Linux ARM64 Signed-off-by: Martin Tzvetanov Grigorov --- .github/build.sh | 59 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 38 +++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100755 .github/build.sh create mode 100644 .github/workflows/ci.yaml diff --git a/.github/build.sh b/.github/build.sh new file mode 100755 index 0000000..0588b8a --- /dev/null +++ b/.github/build.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +set -xe + +rm -rf bifrost bwa htslib samtools sickle + +BIN_FOLDER=$(mktemp -d) +PATH=$BIN_FOLDER:$PATH +NPROC=$(nproc) +ARCH=$(echo $(uname -m) | tr '_' '-') + +# Bifrost +git clone --recursive https://github.com/pmelsted/bifrost.git +pushd bifrost +mkdir build && cd build +cmake .. +make -j$NPROC +sudo make install +file /usr/local/bin/Bifrost | grep $ARCH +popd + +# Bwa +git clone --recursive https://github.com/lh3/bwa.git +pushd bwa +make -j$NPROC +cp bwa $BIN_FOLDER/ +file $BIN_FOLDER/bwa | grep $ARCH +popd + +# Samtools +## Htslib +git clone --recursive https://github.com/samtools/htslib.git +pushd htslib +autoreconf -i +./configure +make -j$NPROC +popd + +## Samtools +git clone --recursive https://github.com/samtools/samtools.git +pushd samtools +make -j$NPROC +cp samtools $BIN_FOLDER/ +file $BIN_FOLDER/samtools | grep $ARCH +popd + +# Sickle +git clone --recursive https://github.com/najoshi/sickle.git +pushd sickle +make -j$NPROC +cp sickle $BIN_FOLDER/ +file $BIN_FOLDER/sickle | grep $ARCH +popd + +# PopIns2 +git config --global --add safe.directory . +mkdir -p build +make -j$NPROC +file popins2 | grep $ARCH \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..dff6715 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build-x86_64: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build + run: .github/build.sh + + build-aarch64: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + githubToken: ${{ github.token }} + dockerRunArgs: | + --volume "${PWD}:/PopIns2" + install: | + apt-get update -q -y + apt-get install -q -y build-essential autoconf git cmake file zlib1g-dev ncurses-dev sudo libbz2-dev liblzma-dev + run: | + pushd /PopIns2 + .github/build.sh \ No newline at end of file From bca2d6e76468e7776bbc776c61154967f62a9fa8 Mon Sep 17 00:00:00 2001 From: Martin Grigorov Date: Wed, 30 Nov 2022 14:15:02 +0200 Subject: [PATCH 2/2] Remove an optional deletion of pre-existing folders --- .github/build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/build.sh b/.github/build.sh index 0588b8a..dc05c05 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -2,8 +2,6 @@ set -xe -rm -rf bifrost bwa htslib samtools sickle - BIN_FOLDER=$(mktemp -d) PATH=$BIN_FOLDER:$PATH NPROC=$(nproc) @@ -56,4 +54,4 @@ popd git config --global --add safe.directory . mkdir -p build make -j$NPROC -file popins2 | grep $ARCH \ No newline at end of file +file popins2 | grep $ARCH