From 1f90b7c73479a6625e964d69fcdca65138498797 Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Wed, 31 Jan 2024 20:00:33 +0800 Subject: [PATCH] Workflow: update. --- .github/workflows/macos.yml | 8 ++++---- .github/workflows/ubuntu.yml | 9 ++++++--- .github/workflows/windows-mingw.yml | 6 +++--- .github/workflows/windows-qt5.yml | 4 ++-- .github/workflows/windows.yml | 15 ++++++++++----- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index acd57747..f88f14e6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13] + os: [macos-latest] qt_ver: [6.6.1] qt_arch: [clang_64] env: @@ -50,13 +50,13 @@ jobs: cmake --version mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/FluentUI/Qt/6.6.1/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/FluentUI/Qt/${{ matrix.qt_ver }}/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel - name: package run: | # 先删除所有dSYM文件,减少包的体积 - sudo find /Users/runner/work/FluentUI/Qt/6.6.1/macos/qml -name "*.dSYM" | xargs rm -r + sudo find /Users/runner/work/FluentUI/Qt/${{ matrix.qt_ver }}/macos/qml -name "*.dSYM" | xargs rm -r # 拷贝依赖 sudo macdeployqt bin/release/${targetName}.app -qmldir=. -dmg @@ -73,4 +73,4 @@ jobs: file: bin/release/${{ env.targetName }}.dmg asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.dmg tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bc25ccd5..a044bb49 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -22,7 +22,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] + os: [ubuntu-latest] qt_ver: [6.6.1] qt_arch: [gcc_64] env: @@ -49,13 +49,16 @@ jobs: - name: ubuntu install GL library run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev + - name: ubuntu install libfuse2 + run: sudo apt install libfuse2 + - name: build ubuntu run: | ninja --version cmake --version mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/FluentUI/Qt/6.6.1/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/FluentUI/Qt/${{ matrix.qt_ver }}/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel - name: install QT linux deploy @@ -87,4 +90,4 @@ jobs: file: ${{ env.targetName }}.AppImage asset_name: ${{ env.targetName }}_${{ github.ref_name }}_${{ matrix.os }}_Qt${{ matrix.qt_ver }}.AppImage tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml index 470cbaec..41ea35b1 100644 --- a/.github/workflows/windows-mingw.yml +++ b/.github/workflows/windows-mingw.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-2022] + os: [windows-latest] include: - qt_arch: win64_mingw qt_ver: 6.6.1 @@ -69,7 +69,7 @@ jobs: mkdir build cd build ninja --version - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.1\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\${{ matrix.qt_ver }}\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel - name: package @@ -101,4 +101,4 @@ jobs: file: ./action-cli/installer.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true diff --git a/.github/workflows/windows-qt5.yml b/.github/workflows/windows-qt5.yml index c4567cab..3d9bca90 100644 --- a/.github/workflows/windows-qt5.yml +++ b/.github/workflows/windows-qt5.yml @@ -50,7 +50,7 @@ jobs: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\5.15.2\msvc2019 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\${{ matrix.qt_ver }}\msvc2019 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% @@ -88,4 +88,4 @@ jobs: file: ./action-cli/installer.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a2a72955..4b8195fc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-2019] + os: [windows-latest] include: - qt_ver: 6.6.1 qt_arch: win64_msvc2019_64 @@ -35,7 +35,12 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - + + - name: Setup ninja + uses: seanmiddleditch/gha-setup-ninja@master + with: + version: 1.10.2 + - name: Install Qt uses: jurplel/install-qt-action@v3 with: @@ -48,11 +53,11 @@ jobs: id: build shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.msvc_arch }} ninja --version mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.1\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\${{ matrix.qt_ver }}\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% @@ -90,4 +95,4 @@ jobs: file: ./action-cli/installer.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true