2023-01-30 03:34:55 +08:00
|
|
|
name: CMake
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- main
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-test:
|
|
|
|
|
|
|
|
name: ${{ matrix.os }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-07-27 21:22:51 +08:00
|
|
|
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12, macos-13, macos-14, windows-2019, windows-2022]
|
2024-07-27 21:24:19 +08:00
|
|
|
qt_version: [5.12.12, 5.15.2, 6.4.0, 6.5.0, 6.6.0, 6.7.0]
|
2023-01-30 03:34:55 +08:00
|
|
|
shared: [ON, OFF]
|
2024-07-27 21:22:51 +08:00
|
|
|
exclude:
|
|
|
|
- os: macos-14
|
|
|
|
qt_version: 5.12.12
|
|
|
|
- os: macos-14
|
|
|
|
qt_version: 5.15.2
|
2023-01-30 03:34:55 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
2024-07-27 21:17:28 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-01-30 03:34:55 +08:00
|
|
|
|
|
|
|
- name: Install Qt
|
2024-07-27 21:17:50 +08:00
|
|
|
uses: jurplel/install-qt-action@v4
|
2023-01-30 03:34:55 +08:00
|
|
|
with:
|
|
|
|
version: ${{ matrix.qt_version }}
|
|
|
|
cache: 'true'
|
|
|
|
cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }}
|
|
|
|
dir: ${{ github.workspace }}/Qt
|
|
|
|
|
|
|
|
- name: Configure (${{ matrix.configuration }})
|
2023-03-22 16:45:44 +08:00
|
|
|
run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -B "${{github.workspace}}/build"
|
2023-01-30 03:34:55 +08:00
|
|
|
|
|
|
|
- name: Build with ${{ matrix.compiler }}
|
|
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|