Updated build.yml #7
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
name: Build | |
on: | |
push: | |
branches: | |
- next | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- runner: ubuntu-latest | |
platform: linux | |
arch: linux_gcc_64 | |
- runner: windows-latest | |
platform: windows | |
arch: win64_msvc2019_64 | |
- runner: macos-latest | |
platform: mac | |
arch: clang_64 | |
runs-on: ${{ matrix.os.runner }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: latest | |
platform: x64 | |
if: ${{ matrix.os.platform == 'linux' }} | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
if: ${{ matrix.os.platform == 'windows' }} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.7.0 | |
host: ${{ matrix.os.platform }} | |
target: desktop | |
arch: ${{ matrix.os.arch }} | |
cache: true | |
setup-python: false | |
tools: 'tools_cmake tools_ninja' | |
- name: Setup env for windows | |
run: | | |
echo "Qt6_DIR=$env:Qt6_DIR" >> $GITHUB_ENV | |
if: ${{ matrix.os.platform == 'windows' }} | |
- name: Cmake | |
run: | | |
mkdir build | |
cmake -DCMAKE_PREFIX_PATH="${Qt6_DIR}/lib/cmake" -DCMAKE_BUILD_TYPE=Release -G Ninja -B build | |
- name: Ninja | |
run: | | |
cd build | |
ninja |