Skip to content

Commit

Permalink
Merge pull request #89 from Nerixyz/ci/build-examples
Browse files Browse the repository at this point in the history
Build library and examples in CI
  • Loading branch information
mohabouje committed Oct 13, 2023
2 parents bddf815 + 277c0fb commit 821c481
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build with CMake

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
BUILD_TYPE: Release
QT_VERSION: 6.6.0

jobs:
build:
strategy:
matrix:
include:
# With Qt examples
- with-qt: true
with-examples: true
# Examples without Qt
- with-qt: false
with-examples: true
# No examples
- with-qt: false
with-examples: false

name: 'Examples: ${{ matrix.with-examples }}, Qt: ${{ matrix.with-qt }}'
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.12.1

- name: Install Qt
if: matrix.with-qt
uses: jurplel/install-qt-action@v3.3.0
with:
cache: true
cache-key-prefix: QtCache-${{ env.QT_VERSION }}
version: ${{ env.QT_VERSION }}

- name: Configure CMake
run: >
cmake
-B build
-G Ninja
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DWINTOASTLIB_BUILD_EXAMPLES=${{ matrix.with-examples && 'On' || 'Off' }}
-DWINTOASTLIB_QT_ENABLED=${{ matrix.with-qt && 'On' || 'Off' }}
- name: Build
working-directory: build
run: ninja all

0 comments on commit 821c481

Please sign in to comment.