From c4fbd4886ef51d49a2a4360334847bb81181d316 Mon Sep 17 00:00:00 2001 From: 5tan <5tan@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:11:39 +0200 Subject: [PATCH] Added windows CI --- .github/workflows/ci.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 161fbd2..aa55a91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,15 @@ jobs: - clang++ extra_check: - '' + gtest_root_flag: + - '' + qt6_root_flag: + - :: include: + - os: windows-latest + compiler: g++ + gtest_root_flag: "-DGTEST_ROOT=D:/gtest" + qt6_root_flag: "-DQt6_DIR=../qt6" - os: ubuntu-latest compiler: clazy extra_check: clazy @@ -52,10 +60,30 @@ jobs: if: matrix.os == 'ubuntu-latest' run: sudo apt-get -y install libgl1-mesa-dev qt6-base-dev libgtest-dev libasound2-dev + - name: Install Qt6 (windows) + if: matrix.os == 'windows-latest' + uses: jurplel/install-qt-action@v4 + with: + version: '6.7.1' + host: 'windows' + target: 'desktop' + arch: 'win64_msvc2019_64' + dir: '${{ github.workspace }}/qt6/' + install-deps: 'true' + modules: 'qtgui qtwidgets' + archives: 'qtbase' + setup-python: 'true' + tools: 'tools_ifw tools_qtcreator,qt.tools.qtcreator' + set-env: 'true' + - name: Install dependencies (macos) if: matrix.os == 'macos-latest' run: brew install googletest qt6 + - name: Install gtest (windows) + if: matrix.os == 'windows-latest' + uses: MarkusJx/googletest-installer@v1.1 + - name: Install clang (linux) if: matrix.os == 'ubuntu-latest' run: sudo apt-get -y install clang @@ -77,7 +105,7 @@ jobs: run: sudo apt-get install -y iwyu - name: Build - run: (mkdir build && cd build && cmake .. -DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" ${{matrix.extra_check_flag}} && make) + run: (mkdir build && cd build && cmake .. -DCMAKE_CXX_COMPILER="${{ matrix.compiler }}" ${{matrix.extra_check_flag}} ${{matrix.gtest_root_flag}} ${{matrix.qt6_root_flag}} && make) - name: Test if: matrix.extra_check == ''