Skip to content

logan

logan #126

Workflow file for this run

name: kmindex
on:
push:
paths-ignore:
- '.github/workflows/doc.yml'
- 'README.md'
- 'docker/**'
- 'conda/**'
- 'scripts/**'
- '.gitignore'
- 'docs/kmindex/**'
pull_request:
paths-ignore:
- '.github/workflows/doc.yml'
- 'README.md'
- 'docker/**'
- 'conda/**'
- 'scripts/**'
- '.gitignore'
- 'docs/kmindex/**'
jobs:
Linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
compiler: [g++-8, g++-9, g++-10]
include:
- compiler: g++-8
cxx: g++-8
cc: gcc-8
- compiler: g++-9
cxx: g++-9
cc: gcc-9
- compiler: g++-10
cxx: g++-10
cc: gcc-10
name: Linux - ${{ matrix.build_type }} - ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Dependencies
run: |
sudo apt-get install ${{ matrix.compiler }}
sudo apt-get install zlib1g zlib1g-dev bzip2 libboost-all-dev
- name: Configure
shell: bash
run: |
mkdir build
cd build
export CC=$(which ${{ matrix.cc }})
export CXX=$(which ${{ matrix.cxx }})
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPORTABLE_BUILD=ON -DWITH_TESTS=ON -DFMT_HEADER_ONLY=ON -DSPDLOG_HEADER_ONLY=ON -DSTATIC_BUILD=ON
- name: Build
shell: bash
run: |
cd build
export CC=$(which ${{ matrix.cc }})
export CXX=$(which ${{ matrix.cxx }})
make
- name: Test
shell: bash
run: |
cd build
ctest --verbose
- name: Package
if: matrix.compiler == 'g++-10' && matrix.build_type == 'Release' && startsWith(github.event.ref, 'refs/tags/v')
shell: bash
run: cd build && make package
- name: Get tag name
if: matrix.compiler == 'g++-10' && matrix.build_type == 'Release' && startsWith(github.event.ref, 'refs/tags/v')
id: tag
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: Release archive
if: matrix.compiler == 'g++-10' && matrix.build_type == 'Release' && startsWith(github.event.ref, 'refs/tags/v')
shell: bash
run: |
mkdir archive_files
bash scripts/git-archive-all.sh --format tar.gz ./archive_files/kmindex-${{ steps.tag.outputs.TAG }}-sources.tar.gz
mv build/kmindex-${{ steps.tag.outputs.TAG }}-bin-Linux.tar.gz archive_files
- name: Release
if: matrix.compiler == 'g++-10' && matrix.build_type == 'Release' && startsWith(github.event.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
release_name: Release ${{ steps.tag.outputs.TAG }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: 'archive_files/*'
file_glob: true
tag: ${{ github.ref }}
body: |
kmindex v${{ steps.tags.outputs.TAG }}
prerelease: true