diff --git a/.github/workflows/build-multi-platform.yml b/.github/workflows/build-multi-platform.yml new file mode 100644 index 0000000..cb8af1b --- /dev/null +++ b/.github/workflows/build-multi-platform.yml @@ -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