-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from Nerixyz/ci/build-examples
Build library and examples in CI
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
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/[email protected] | ||
|
||
- name: Install Qt | ||
if: matrix.with-qt | ||
uses: jurplel/[email protected] | ||
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 |