CI: Test with ubuntu-latest and newer Qt 5.15 #1025
Workflow file for this run
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: Linux Build | |
# yamllint disable-line rule:truthy | |
on: | |
- push | |
jobs: | |
build: | |
name: ${{matrix.buildname}} | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
buildname: Linux-GCC | |
build_type: Debug | |
compiler: g++ | |
coverage: true | |
compiler_flags: >- | |
--coverage | |
-fprofile-arcs | |
-ftest-coverage | |
-fprofile-abs-path | |
compiler_package: g++ | |
with_qt6: false | |
- os: ubuntu-20.04 | |
buildname: Linux-Clang | |
build_type: Debug | |
compiler: clang++ | |
compiler_package: clang | |
with_qt6: false | |
- os: ubuntu-latest | |
buildname: Linux-latest | |
build_type: Debug | |
compiler: g++ | |
compiler_package: g++ | |
with_qt6: false | |
- os: ubuntu-latest | |
buildname: Qt 6 | |
build_type: Debug | |
compiler: g++ | |
compiler_package: g++ | |
with_qt6: true | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
with: | |
submodules: false | |
fetch-depth: 1 | |
- name: Install dependencies | |
uses: nick-invision/retry@v2 | |
env: | |
WITH_QT6: '${{matrix.with_qt6}}' | |
with: | |
timeout_minutes: 10 | |
retry_wait_seconds: 30 | |
max_attempts: 3 | |
command: >- | |
'${{github.workspace}}/utils/github/install-linux.sh' | |
'${{matrix.compiler_package}}' | |
- name: Build with CMake | |
uses: lukka/run-cmake@v3 | |
with: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeListsTxtPath: '${{github.workspace}}/CMakeLists.txt' | |
cmakeBuildType: Release | |
cmakeGenerator: Ninja | |
buildDirectory: '${{runner.workspace}}/build' | |
cmakeAppendedArgs: >- | |
-DWITH_TESTS=TRUE | |
-DPEDANTIC=TRUE | |
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' | |
-DCMAKE_INSTALL_PREFIX='${{runner.workspace}}/install' | |
-DCMAKE_CXX_FLAGS='${{matrix.compiler_flags}}' | |
-DCMAKE_C_FLAGS='${{matrix.compiler_flags}}' | |
-DCMAKE_CXX_COMPILER='${{matrix.compiler}}' | |
-DWITH_QT6='${{matrix.with_qt6}}' | |
- name: Install with CMake | |
run: cmake --install '${{runner.workspace}}/build' | |
- name: Create gnupg directory for tests | |
run: mkdir -p ~/.gnupg | |
- name: Run tests | |
working-directory: '${{runner.workspace}}/install/bin' | |
run: '${{github.workspace}}/utils/github/test-linux.sh' | |
- name: Update coverage | |
if: matrix.coverage | |
env: | |
COVERALLS_REPO_TOKEN: '${{secrets.COVERALLS_REPO_TOKEN}}' | |
run: >- | |
'${{github.workspace}}/utils/github/coverage-linux.sh' | |
'${{runner.workspace}}/build' |