Skip to content

Commit

Permalink
Create build-multi-platform.yml (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV authored May 23, 2024
1 parent eae8553 commit d1c1eac
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-multi-platform.yml
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

0 comments on commit d1c1eac

Please sign in to comment.