README: add missing space #47
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: Debug | |
on: [ push, workflow_dispatch, pull_request, merge_group ] | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
# Avoid duplicate builds on PR from the same repository | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Ubuntu Latest GCC", | |
os: ubuntu-latest, | |
build_type: "Debug", | |
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles", | |
qt_version: "native", | |
qt_install_command: "sudo apt-get update && sudo apt-get install qtbase5-dev", | |
# Apt is significantly faster that aqt. | |
} | |
- { | |
name: "Ubuntu Latest GCC + Qt6", | |
os: ubuntu-latest, | |
build_type: "Debug", | |
cc: "gcc", cxx: "g++", build_system: "Unix Makefiles", | |
qt_version: "6.2.1" | |
} | |
- { | |
name: "macOS AMD64 Clang", | |
os: macos-13, | |
build_type: "Debug", | |
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles", | |
qt_version: "5.15.2", | |
# Cached aqt is faster that brew. | |
} | |
- { | |
name: "macOS ARM Clang + Qt6", | |
os: macos-latest, | |
build_type: "Debug", | |
cc: "clang", cxx: "clang++", build_system: "Unix Makefiles", | |
qt_version: "6.6.3", | |
# Cached aqt is faster that brew. | |
} | |
- { | |
name: "Windows 2019 MinGW", | |
os: windows-2019, | |
build_type: "Debug", | |
cc: "gcc", cxx: "g++", build_system: "MinGW Makefiles", | |
# Older Qt releases do not have 64bit mingw release | |
qt_version: "5.12.9", qt_arch: "win64_mingw73" | |
} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Qt | |
# Cache only when not installed by os package manager | |
if: matrix.config.qt_version != 'native' | |
id: cache-qt | |
uses: actions/cache@v2 | |
with: | |
path: ${{ github.workspace }}/Qt | |
key: ${{ runner.os }}-${{ matrix.config.qt_version }}-Qt | |
- name: Install specified Qt version | |
if: matrix.config.qt_version != 'native' | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.config.qt_version }} | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
arch: ${{ matrix.config.qt_arch }} | |
dir: ${{ github.workspace }}/Qt | |
- name: Install native Qt by package manager | |
if: matrix.config.qt_version == 'native' | |
run: ${{ matrix.config.qt_install_command }} | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{ github.workspace }}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: "cmake $GITHUB_WORKSPACE | |
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} | |
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} | |
-DFORCE_COLORED_OUTPUT=true | |
-G \"${{ matrix.config.build_system }}\"" | |
- name: Build | |
working-directory: ${{ github.workspace }}/build | |
run: cmake --build . -j3 | |
- name: Test | |
working-directory: ${{ github.workspace }}/build | |
shell: bash | |
run: ctest --output-on-failure --verbose | |
- name: Store created artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ runner.os }}-qt${{ matrix.config.qt_version }} | |
path: ${{ github.workspace }}/build/target | |
build-emscripten: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "WASM Linux", | |
os: ubuntu-latest, | |
build_type: Release, | |
qt_arch: wasm_32, | |
emsdk_version: 1.39.8, | |
qt_version: 5.15.2, | |
} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Qt | |
id: cache-qt | |
uses: actions/cache@v2 | |
with: | |
path: ${{ github.workspace }}/Qt | |
key: ${{ runner.os }}-${{ matrix.config.qt_version }}-wasm-Qt | |
- name: Setup EMSDK cache | |
id: cache-system-libraries | |
uses: actions/cache@v4 | |
with: | |
path: 'emsdk-cache' | |
key: ${{ runner.os }}-${{ matrix.config.emsdk_version }}-${{ matrix.config.qt_version }}-emsdk | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v11 | |
with: | |
version: ${{ matrix.config.emsdk_version }} | |
actions-cache-folder: 'emsdk-cache' | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.config.qt_version }} | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
arch: ${{ matrix.config.qt_arch }} | |
dir: ${{ github.workspace }}/Qt | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/build | |
run: "emcmake cmake $GITHUB_WORKSPACE | |
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} | |
-DCMAKE_PREFIX_PATH=$Qt5_DIR | |
-DCMAKE_FIND_ROOT_PATH=$Qt5_DIR | |
-DFORCE_COLORED_OUTPUT=true | |
-Wno-dev" | |
- name: Build | |
working-directory: ${{ github.workspace }}/build | |
run: cmake --build . -j3 | |
- name: Store created artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-wasm-${{ runner.os }}-qt${{ matrix.config.qt_version }} | |
path: ${{ github.workspace }}/build/target |