Add building without templateengine as an option #23
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: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build: | |
name: ${{ matrix.os }}-${{ matrix.compiler.cc }}-Qt${{ matrix.qt.version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- "ubuntu-latest" | |
- "macos-latest" | |
compiler: | |
- cc: "gcc" | |
cxx: "g++" | |
- cc: "clang" | |
cxx: "clang++" | |
qt: | |
- version: "5.12.2" | |
extra_modules: "" | |
- version: "6.2.0" | |
extra_modules: "qt5compat" | |
exclude: | |
- os: "macos-latest" | |
compiler: | |
cc: "gcc" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jurplel/install-qt-action@v2 | |
with: | |
version: ${{ matrix.qt.version }} | |
modules: ${{ matrix.qt.extra_modules }} | |
- name: Build QtWebApp | |
run: | | |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "$CC" == "clang" ]; then export LDFLAGS=-fuse-ld=lld; fi | |
mkdir build | |
pushd build | |
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release .. | |
make | |
sudo make install | |
popd # build | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
- name: Build Demo1 | |
run: | | |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "$CC" == "clang" ]; then export LDFLAGS=-fuse-ld=lld; fi | |
pushd Demo1 | |
mkdir build | |
pushd build | |
cmake -G 'Unix Makefiles' .. | |
make | |
popd # Demo1 | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
- name: Build Demo2 | |
run: | | |
if [ "${{ matrix.os }}" == "ubuntu-latest" ] && [ "$CC" == "clang" ]; then export LDFLAGS=-fuse-ld=lld; fi | |
pushd Demo2 | |
mkdir build | |
pushd build | |
cmake -G 'Unix Makefiles' .. | |
make | |
popd # Demo2 | |
env: | |
CC: ${{ matrix.compiler.cc }} | |
CXX: ${{ matrix.compiler.cxx }} | |
windows-mingw: | |
name: "Windows" | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
include: | |
- name: Windows MinGW 8.1 | |
arch: win32_mingw81 | |
generator: "-G 'Unix Makefiles'" | |
qt_version: "5.15.2" | |
- name: Windows MSVC 2019 | |
arch: win64_msvc2019_64 | |
generator: "" | |
qt_version: "5.15.2" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jurplel/install-qt-action@v2 | |
with: | |
arch: ${{ matrix.arch }} | |
version: ${{ matrix.qt_version }} | |
- uses: jurplel/install-qt-action@v2 | |
if: matrix.arch == 'win32_mingw81' | |
with: | |
tools-only: 'true' | |
tools: 'tools_mingw,8.1.0-1-202004170606,qt.tools.win32_mingw810' | |
- name: Add g++ to PATH | |
if: matrix.arch == 'win32_mingw81' | |
run: echo "$env:IQTA_TOOLS/mingw810_32/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- run: cmake -B build-qtwebapp ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=Release | |
- run: cmake --build build-qtwebapp | |
- run: cmake --build build-qtwebapp --target install | |
- run: cmake -S Demo1 -B build-demo1 ${{ matrix.generator }} | |
- run: cmake --build build-demo1 | |
- run: cmake -S Demo2 -B build-demo2 ${{ matrix.generator }} | |
- run: cmake --build build-demo2 |