Skip to content

Merge tag 'v0.2.0' into ci #115

Merge tag 'v0.2.0' into ci

Merge tag 'v0.2.0' into ci #115

Workflow file for this run

name: CI
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build-epik:
name: ${{matrix.config.buildname}}
runs-on: ${{matrix.config.os}}
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-22.04, compiler: 'gcc', buildname: 'ubuntu-22.04-gcc'}
- {os: ubuntu-22.04, compiler: 'clang', buildname: 'ubuntu-22.04-clang'}
- {os: 'ubuntu-20.04', compiler: 'gcc', buildname: 'ubuntu-20.04-gcc'}
- {os: 'ubuntu-20.04', compiler: 'clang', buildname: 'ubuntu-20.04-clang'}
- {os: macos-13, compiler: 'clang', buildname: 'macos-13'}
- {os: macos-12, compiler: 'clang', buildname: 'macos-12'}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: (MacOS) Install dependencies
if: contains(matrix.config.os, 'macos')
run: |
brew update
brew install cmake boost zlib rapidjson libomp
pip3 install click tqdm
- name: (Linux) Install dependencies
if: contains(matrix.config.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -yq build-essential cmake libboost-dev libboost-serialization-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev zlib1g-dev rapidjson-dev libquadmath0 python3-pip
pip3 install click tqdm
- name: (Linux Clang) Install Clang
if: contains(matrix.config.os, 'ubuntu') && (matrix.config.compiler == 'clang')
run: sudo apt install clang
- name: (MacOS) Configure CMake
if: contains(matrix.config.os, 'macos')
run: cmake -DCMAKE_CXX_FLAGS="-L/usr/local/opt/libomp/lib -I/usr/local/opt/libomp/include" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" -DOpenMP_CXX_LIB_NAMES="omp" -DOpenMP_omp_LIBRARY="/usr/local/opt/libomp/lib/libomp.dylib" -B ${{runner.workspace}}/bin -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: (Linux GCC) Configure CMake
if: contains(matrix.config.os, 'ubuntu') && (matrix.config.compiler == 'gcc')
run: cmake -B ${{runner.workspace}}/bin -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: (Linux Clang) Configure CMake
if: contains(matrix.config.os, 'ubuntu') && (matrix.config.compiler == 'clang')
run: cmake -B ${{runner.workspace}}/bin -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DC_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_OMP=OFF
- name: Build
run: cmake --build ${{runner.workspace}}/bin --config $BUILD_TYPE -j ${{ steps.cpu-cores.outputs.count }}
- name: Test build successful
working-directory: ${{runner.workspace}}/bin
run: |
test -f ${{runner.workspace}}/bin/epik/epik-dna
test -f ${{runner.workspace}}/bin/epik/epik-aa
- name: Install
run: sudo cmake --install ${{runner.workspace}}/bin
- name: Test installation and the python wrapper
run: |
epik.py --help
epik.py place --help
- name: Test placement
run: |
cd tests
bash test-placement.sh