2020-01-04 01:15:33 +08:00
|
|
|
name: "CI: Build Test"
|
2020-01-03 18:11:40 +08:00
|
|
|
|
2021-10-03 16:11:36 +08:00
|
|
|
on:
|
|
|
|
push:
|
2021-10-03 16:26:46 +08:00
|
|
|
branches-ignore:
|
|
|
|
- "releases/**"
|
2021-10-03 16:11:36 +08:00
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2022-04-03 23:14:23 +08:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2020-01-03 18:11:40 +08:00
|
|
|
|
2022-06-07 21:25:11 +08:00
|
|
|
jobs:
|
2020-01-03 18:11:40 +08:00
|
|
|
build:
|
2022-04-06 05:04:31 +08:00
|
|
|
name: Build
|
2020-01-03 18:35:41 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-06-13 06:34:58 +08:00
|
|
|
qt_version: [5.15.0, 6.2.6, 6.5.0]
|
2020-12-22 01:13:33 +08:00
|
|
|
platform: [ubuntu-20.04, windows-latest, macos-latest]
|
2020-10-24 18:42:20 +08:00
|
|
|
include:
|
|
|
|
- qt_version: 6.0.0
|
|
|
|
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
|
2022-04-04 05:47:40 +08:00
|
|
|
- qt_version: 6.2.0
|
|
|
|
additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6
|
2020-12-22 01:13:33 +08:00
|
|
|
- platform: ubuntu-20.04
|
2021-10-03 17:18:52 +08:00
|
|
|
make: make
|
2020-10-24 19:25:40 +08:00
|
|
|
CXXFLAGS: -Wall -Wextra -pedantic -Werror
|
2021-10-03 16:58:31 +08:00
|
|
|
MAKEFLAGS: -j2
|
2020-10-24 19:25:40 +08:00
|
|
|
- platform: macos-latest
|
2021-10-03 17:18:52 +08:00
|
|
|
make: make
|
2020-10-24 19:25:40 +08:00
|
|
|
CXXFLAGS: -Wall -Wextra -pedantic -Werror
|
2021-10-03 16:58:31 +08:00
|
|
|
MAKEFLAGS: -j3
|
2020-10-24 19:25:40 +08:00
|
|
|
- platform: windows-latest
|
2021-10-03 17:18:52 +08:00
|
|
|
make: nmake
|
|
|
|
CXXFLAGS: /W4 /WX /MP
|
2020-01-03 18:35:41 +08:00
|
|
|
|
2020-01-03 18:43:13 +08:00
|
|
|
runs-on: ${{ matrix.platform }}
|
2020-10-24 19:25:40 +08:00
|
|
|
env:
|
|
|
|
CXXFLAGS: ${{ matrix.CXXFLAGS }}
|
2021-10-03 16:58:31 +08:00
|
|
|
MAKEFLAGS: ${{ matrix.MAKEFLAGS }}
|
2020-01-03 18:26:13 +08:00
|
|
|
|
2020-01-03 18:11:40 +08:00
|
|
|
steps:
|
2021-10-03 16:18:23 +08:00
|
|
|
- name: Clone repo
|
|
|
|
uses: actions/checkout@v2.3.4
|
2021-10-03 16:11:55 +08:00
|
|
|
|
|
|
|
- name: Install Qt
|
2021-10-03 17:50:50 +08:00
|
|
|
uses: jurplel/install-qt-action@v2.14.0
|
2021-10-03 16:11:55 +08:00
|
|
|
with:
|
|
|
|
version: ${{ matrix.qt_version }}
|
|
|
|
|
2021-10-03 16:36:47 +08:00
|
|
|
- name: Build library with CMake
|
2021-10-03 16:18:23 +08:00
|
|
|
run: |
|
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
|
|
|
cmake --build .
|
2021-10-03 16:11:55 +08:00
|
|
|
|
2021-10-03 16:36:47 +08:00
|
|
|
- name: Build basic example with CMake
|
2021-10-03 16:11:55 +08:00
|
|
|
working-directory: examples/basic/
|
|
|
|
run: |
|
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
|
|
|
cmake --build .
|
|
|
|
|
2023-03-13 15:46:13 +08:00
|
|
|
- name: Build calculator example with CMake
|
2021-10-03 16:11:55 +08:00
|
|
|
working-directory: examples/calculator/
|
|
|
|
run: |
|
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
|
|
|
cmake --build .
|
|
|
|
|
2021-10-03 16:36:47 +08:00
|
|
|
- name: Build sending_arguments example with CMake
|
2021-10-03 16:11:55 +08:00
|
|
|
working-directory: examples/sending_arguments/
|
|
|
|
run: |
|
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
|
|
|
cmake --build .
|
2021-10-03 16:36:47 +08:00
|
|
|
|
2023-03-13 15:46:13 +08:00
|
|
|
- name: Build windows_raise_widget example with CMake
|
|
|
|
working-directory: examples/windows_raise_widget/
|
|
|
|
run: |
|
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
|
|
|
cmake --build .
|
|
|
|
|
2021-10-03 16:36:47 +08:00
|
|
|
- name: Setup MSVC environment for QMake
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
|
|
|
|
- name: Build basic example with QMake
|
|
|
|
working-directory: examples/basic/
|
|
|
|
run: |
|
|
|
|
qmake
|
2021-10-03 17:18:52 +08:00
|
|
|
${{ matrix.make }}
|
2021-10-03 16:36:47 +08:00
|
|
|
|
2023-03-13 15:46:13 +08:00
|
|
|
- name: Build calculator example with QMake
|
2021-10-03 16:36:47 +08:00
|
|
|
working-directory: examples/calculator/
|
|
|
|
run: |
|
|
|
|
qmake
|
2021-10-03 17:18:52 +08:00
|
|
|
${{ matrix.make }}
|
2021-10-03 16:36:47 +08:00
|
|
|
|
|
|
|
- name: Build sending_arguments example with QMake
|
|
|
|
working-directory: examples/sending_arguments/
|
|
|
|
run: |
|
|
|
|
qmake
|
2021-10-03 17:18:52 +08:00
|
|
|
${{ matrix.make }}
|
2023-03-13 15:46:13 +08:00
|
|
|
|
|
|
|
- name: Build windows_raise_widget example with QMake
|
|
|
|
working-directory: examples/windows_raise_widget/
|
|
|
|
run: |
|
|
|
|
qmake
|
|
|
|
${{ matrix.make }}
|