From c3824ecef044b71ea31c790b47a7b91a7ba44f96 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Thu, 13 Oct 2022 11:29:19 +0800 Subject: [PATCH] try to fix ci, take 3 Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- .github/workflows/ci.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8349b9d..0c9a471 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,12 +19,22 @@ jobs: matrix: qt-version: [5.15.2, 6.4.0] platform: [windows-latest, ubuntu-latest, macos-latest] + include: + - platform: windows-latest + CC: cl.exe + CXX: cl.exe + make: nmake.exe + - platform: ubuntu-latest + CC: gcc + CXX: g++ + make: make + - platform: macos-latest + CC: clang + CXX: clang++ + make: make runs-on: ${{ matrix.platform }} - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - steps: - name: Check out repository uses: actions/checkout@v3 @@ -35,12 +45,11 @@ jobs: version: ${{ matrix.qt-version }} cache: true - - name: Setup Ninja - uses: ashutoshvarma/setup-ninja@v1 - with: - version: 1.11.1 # Current latest version. + - name: Setup MSVC environment + if: ${{ matrix.platform == 'windows-latest' }} + uses: ilammy/msvc-dev-cmd@v1 - - name: Install dependencies + - name: Install Linux dependencies if: ${{ matrix.platform == 'ubuntu-latest' }} run: | sudo apt install -y libxcb1-dev libgtk-3-dev @@ -49,5 +58,5 @@ jobs: run: | mkdir ci-test-build cd ci-test-build - cmake -DCMAKE_BUILD_TYPE=Release -DFRAMELESSHELPER_EXAMPLES_DEPLOYQT=OFF -GNinja .. + cmake -DCMAKE_C_COMPILER=${{ matrix.CC }} -DCMAKE_CXX_COMPILER=${{ matrix.CXX }} -DCMAKE_BUILD_TYPE=Release -DFRAMELESSHELPER_EXAMPLES_DEPLOYQT=OFF .. cmake --build . --target all --config Release --parallel