2020-01-04 01:15:33 +08:00
|
|
|
name: "CI: Build Test"
|
2020-01-03 18:11:40 +08:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2020-01-03 18:35:41 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-10-24 18:42:20 +08:00
|
|
|
qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0, 6.0.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
|
2020-12-22 01:13:33 +08:00
|
|
|
- platform: ubuntu-20.04
|
2020-10-24 19:25:40 +08:00
|
|
|
CXXFLAGS: -Wall -Wextra -pedantic -Werror
|
|
|
|
- platform: macos-latest
|
|
|
|
CXXFLAGS: -Wall -Wextra -pedantic -Werror
|
|
|
|
- platform: windows-latest
|
|
|
|
CXXFLAGS: /W4 /WX
|
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 }}
|
2020-01-03 18:26:13 +08:00
|
|
|
|
2020-01-03 18:11:40 +08:00
|
|
|
steps:
|
2020-12-22 01:09:21 +08:00
|
|
|
- uses: actions/checkout@v2.3.4
|
2020-01-03 18:26:13 +08:00
|
|
|
|
2020-01-03 18:18:30 +08:00
|
|
|
- name: Install Qt
|
2020-12-22 01:09:21 +08:00
|
|
|
uses: jurplel/install-qt-action@v2.11.1
|
2020-01-03 18:18:30 +08:00
|
|
|
with:
|
2020-01-03 18:35:41 +08:00
|
|
|
version: ${{ matrix.qt_version }}
|
2020-01-03 18:26:13 +08:00
|
|
|
|
2020-01-03 18:11:40 +08:00
|
|
|
- name: cmake
|
2020-10-24 18:42:20 +08:00
|
|
|
run: cmake . ${{ matrix.additional_arguments }}
|
2020-01-03 18:26:13 +08:00
|
|
|
|
2020-01-04 01:02:37 +08:00
|
|
|
- name: cmake build
|
|
|
|
run: cmake --build .
|
2020-01-03 18:26:13 +08:00
|
|
|
|
|
|
|
- name: Build example - basic (cmake)
|
|
|
|
working-directory: examples/basic/
|
2020-01-04 01:31:23 +08:00
|
|
|
run: |
|
2020-10-24 18:42:20 +08:00
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
2020-01-04 01:31:23 +08:00
|
|
|
cmake --build .
|
2020-01-03 18:26:13 +08:00
|
|
|
|
|
|
|
- name: Build example - calculator (cmake)
|
|
|
|
working-directory: examples/calculator/
|
2020-01-04 01:31:23 +08:00
|
|
|
run: |
|
2020-10-24 18:42:20 +08:00
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
2020-01-04 01:31:23 +08:00
|
|
|
cmake --build .
|
2020-01-03 18:26:13 +08:00
|
|
|
|
|
|
|
- name: Build example - sending_arguments (cmake)
|
|
|
|
working-directory: examples/sending_arguments/
|
2020-01-04 01:31:23 +08:00
|
|
|
run: |
|
2020-10-24 18:42:20 +08:00
|
|
|
cmake . ${{ matrix.additional_arguments }}
|
2020-01-04 01:31:23 +08:00
|
|
|
cmake --build .
|