Skip to content

leviosam_utils refactor (#75) #48

leviosam_utils refactor (#75)

leviosam_utils refactor (#75) #48

Workflow file for this run

name: Build and ctest
on:
push:
branches: [ main ]
paths:
- '.github/**'
- 'src/**'
- 'leviosam-test.py'
- 'CMakeLists.txt'
- 'CMakeLists.txt.in'
- 'testdata/**'
pull_request:
branches:
- 'main'
paths:
- '.github/**'
- 'src/**'
- 'leviosam-test.py'
- 'CMakeLists.txt'
- 'CMakeLists.txt.in'
- 'testdata/**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
htslib_matrix:
strategy:
matrix:
version: [1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18]
os: [ubuntu-22.04, ubuntu-20.04, ubuntu-latest]
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up SDSL
run: sudo apt-get -y install libsdsl-dev
- name: Set up htslib
run: wget https://github.com/samtools/htslib/releases/download/${{ matrix.version }}/htslib-${{ matrix.version }}.tar.bz2 && tar -vxjf htslib-${{ matrix.version }}.tar.bz2 && cd htslib-${{ matrix.version }} && ./configure && make && sudo make install && cd ../ && rm htslib-${{ matrix.version }}.tar.bz2
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}