Skip to content

Update build.yml

Update build.yml #192

Workflow file for this run

name: build
on: [push]
env:
BUILD_TYPE: Release
jobs:
build-ipk:
name: ${{matrix.buildname}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, ubuntu-20.04, macos-13, macos-12 ]
include:
- os: ubuntu-22.04
buildname: 'ubuntu-22.04'
triplet: x64-linux
compiler: gcc_64
- os: ubuntu-20.04
buildname: 'ubuntu-20.04'
triplet: x64-linux
compiler: gcc_64
- os: macos-13
buildname: 'macos-13'
triplet: x64-osx
compiler: clang_64
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: 'true'
submodules: recursive
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: (MacOS) Install dependencies
if: runner.os == 'macOS'
run: brew update && brew install cmake boost zlib coreutils && pip3 install click
- name: (Linux) Install dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -yq libboost-dev libboost-serialization-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev zlib1g-dev
- name: (MacOS) Download RAxML-ng
if: runner.os == 'macOS'
run: |
mkdir -p ${{runner.workspace}}/opt/bin
wget https://github.com/amkozlov/raxml-ng/releases/download/1.2.0/raxml-ng_v1.2.0_macos_x86_64.zip
unzip raxml-ng_v1.2.0_macos_x86_64.zip
mv raxml-ng ${{runner.workspace}}/opt/bin
- name: (Linux) Download RAxML-ng
if: runner.os == 'Linux'
run: |
mkdir -p ${{runner.workspace}}/opt/bin
wget https://github.com/amkozlov/raxml-ng/releases/download/1.2.0/raxml-ng_v1.2.0_linux_x86_64.zip
unzip raxml-ng_v1.2.0_linux_x86_64.zip
mv raxml-ng ${{runner.workspace}}/opt/bin
- name: Configure CMake
run: cmake -B ${{runner.workspace}}/bin -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{runner.workspace}}/bin --config $BUILD_TYPE -j ${{ steps.cpu-cores.outputs.count }}
- name: Build tools
run: cmake --build ${{runner.workspace}}/bin --config $BUILD_TYPE --target diff-dna diff-aa -j ${{ steps.cpu-cores.outputs.count }}
- name: Install
run: cmake --install ${{runner.workspace}}/bin --prefix "${{runner.workspace}}/opt"
- name: Test installation complete
run: |
export PATH="${{runner.workspace}}/opt/bin:$PATH"
ipk.py
ipk.py build --help
- name: Test database build
run: bash tests/test-db-build.sh ${{runner.workspace}}/opt/bin ${{runner.workspace}}