-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create build-multi-platform.yml (#1)
- Loading branch information
Showing
1 changed file
with
31 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,31 @@ | ||
name: build Qt multi-platform | ||
|
||
on: push # when to trigger this. Here, on every push | ||
jobs: | ||
build_and_test: | ||
name: "Build and test" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] # we build on GitHub-provided Windows and Linux images | ||
runs-on: ${{ matrix.os }} # use value from the matrix | ||
steps: | ||
- name: Install dependencies (linux) | ||
run: sudo apt install ninja-build | ||
if: matrix.os == 'ubuntu-latest' # conditional, runs this step only on the Ubuntu runner | ||
- name: Install Ninja (windows) # Ninja is not available in GitHub-provided images, | ||
# see https://github.com/actions/runner-images/issues/514 | ||
run: choco install ninja # So let's install it through Chocolatey | ||
if: matrix.os == 'windows-latest' | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
version: '6.5.3' | ||
- uses: ilammy/msvc-dev-cmd@v1 # This action essentially calls vcvarsall.bat for the latest VS in the runner for x64 | ||
- uses: actions/checkout@v3 # Actually check out the sources. GH Actions can run for events that may not require | ||
# sources (e.g. when someone comments on an issue) | ||
|
||
# Here we call CMake manually, there are solutions for that in the Marketplace: https://github.com/marketplace/actions/run-cmake | ||
- name: Build | ||
# We don't need to set up the environment variable for CMake to see Qt because the install-qt-action | ||
# sets up the necessary variables automatically | ||
run: cmake -S . -B build -G "Ninja Multi-Config" && cmake --build build --config Release |