Skip to content

Commit

Permalink
Merge pull request #34 from martin-g/support-linux-arm64
Browse files Browse the repository at this point in the history
Add CI for Linux AMD64/ARM64 based on Github Actions
  • Loading branch information
Krannich479 authored Nov 30, 2022
2 parents 47964d4 + bca2d6e commit 07b2936
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash

set -xe

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
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 07b2936

Please sign in to comment.