Skip to content

Unbreak

Unbreak #302

Workflow file for this run

name: build-test
on:
workflow_dispatch:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
env:
BUILD_TYPE: Release
QT_QPA_PLATFORM: offscreen
XDG_RUNTIME_DIR: '/tmp/runtime-runner'
QT_VERSION: 6.2.*
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
experimental: [false]
steps:
- name: Grab cmake & ninja
uses: lukka/get-cmake@latest
- name: Update deps
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
elif [ "$RUNNER_OS" == "macOS" ]; then
brew update
fi
shell: bash
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}
variant: sccache
- name: '⚙️ Configure MSVC'
if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache
version: ${{env.QT_VERSION}}
- name: Install BLAST
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y ncbi-blast+
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install blast
fi
shell: bash
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=sccache -D CMAKE_CXX_COMPILER_LAUNCHER=sccache -G Ninja
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Unit Tests
if: ${{ matrix.os != 'windows-latest' }}
working-directory: ${{github.workspace}}/build
run: ctest -V -C ${{env.BUILD_TYPE}}
- name: CLI Tests
working-directory: ${{github.workspace}}/tests
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
./bandage_command_line_tests.sh ${{github.workspace}}/build/BandageNG
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install imagemagick
./bandage_command_line_tests.sh ${{github.workspace}}/build/BandageNG.app/Contents/MacOS/BandageNG
fi
shell: bash
- uses: actions/upload-artifact@v4
with:
name: Bandage-${{ runner.os }}
path: |
${{github.workspace}}/build/BandageNG
${{github.workspace}}/build/BandageNG.app
${{github.workspace}}/build/BandageNG.exe
${{github.workspace}}/build/BandageTests
${{github.workspace}}/build/BandageTests.exe