Merge pull request #270 from Hakansv/master #13
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
--- | |
# yamllint disable rule:line-length | |
name: Linux build | |
on: | |
push: | |
branches: | |
- master | |
- ci_update | |
paths-ignore: | |
- 'manual/**' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'manual/**' | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Ubuntu latest wxGTK 3 | |
runner: ubuntu-latest | |
cmake_generator: Unix Makefiles | |
env: | |
wxGTK_VERSION: ${{ matrix.gtk_version && matrix.gtk_version || 3 }} | |
# Use bash as the shell, even under MSW where the default is PowerShell. | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Before build | |
run: | | |
./ci/github-pre-build.sh | |
env: | |
USE_HOMEBREW: ${{ matrix.use_homebrew && matrix.use_homebrew || 0 }} | |
- name: Configure CMake | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmake_defines }} | |
- name: Build | |
run: cmake --build build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
if: runner.os != 'Linux' | |
# TODO: The tests do not work in headless Linux containers (GTK crashes) with wxWidgets 3.0 available in Ubuntu | |
# They seem to be fine with wx 3.1 though, so we will just remove the condition "later" when wx3.2 time comes | |
# On Windows, we would need opencpn.exe in the worjing directory to run the tests (and wxWidgets libs in the path) | |
working-directory: build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
... |