Skip to content

[CI]

[CI] #96

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: matrix.config.os == 'macOS'
run: |
brew update
brew install cmake boost zlib rapidjson libomp
pip3 install click tqdm
- name: (Linux GCC) Install dependencies
if: (matrix.config.os == 'Linux') && (matrix.config.compiler == 'gcc')
run: |
sudo apt-get update
sudo apt-get 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 dependencies
if: (matrix.config.os == 'Linux') && (matrix.config.compiler == 'clang')
run: |
sudo apt-get update
sudo apt-get 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 clang++
pip3 install click tqdm
- name: (MacOS) Configure CMake
if: 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: (matrix.config.os == 'Linux') && (matrix.config.compiler == 'gcc')
run: cmake -B ${{runner.workspace}}/bin -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: (Linux Clang) Configure CMake
if: (matrix.config.os == 'Linux') && (matrix.config.compiler == 'clang')
run: cmake -B ${{runner.workspace}}/bin -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DC_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- 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