Fix tests #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GTest tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [develop] | |
pull_request: | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
CMAKE_BUILD_PARALLEL_LEVEL: 2 | |
INSTALL_PREFIX: ${{github.workspace}}/deps | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
[ubuntu-latest, windows-latest] | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install linux dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qq libusb-1.0-0-dev | |
- name: Install osx dependencies | |
if: matrix.os == 'macos-latest' | |
run: brew install libusb | |
- name: Download windows dependencies | |
if: matrix.os == 'windows-latest' | |
run: | | |
mkdir ${{github.workspace}}/deps | |
curl -o ${{github.workspace}}/deps/FX3SDK.zip -L https://downloads.myriadrf.org/project/limesuite/appveyor/FX3SDK.zip | |
7z x ${{github.workspace}}/deps/FX3SDK.zip -o${{github.workspace}}/deps/FX3SDK | |
- name: Configure CMake (windows) | |
if: matrix.os == 'windows-latest' | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DFX3_SDK_RELATIVE_PATH=deps/FX3SDK -DBUILD_SHARED_LIBS=OFF | |
- name: Configure CMake (linux) | |
if: matrix.os != 'windows-latest' | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DBUILD_SHARED_LIBS=OFF -DBINARY_OUTPUT_DIR=${{github.workspace}}/build/bin/ | |
- name: Build tests | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target limesuiteng-test | |
- name: Run tests (Linux) | |
if: matrix.os != 'windows-latest' | |
run: ${{github.workspace}}/build/bin/limesuiteng-test | |
- name: Run tests (Windows) | |
if: matrix.os == 'windows-latest' | |
run: ${{github.workspace}}/build/bin/${{env.BUILD_TYPE}}/limesuiteng-test.exe |