From 50d7eb49ff18592d4d7ea5697f7be43939bbf941 Mon Sep 17 00:00:00 2001 From: EtlamGit Date: Sun, 6 Oct 2024 18:25:31 +0200 Subject: [PATCH] update GitHub CI Actions bumb version of checkout to @v4 bumb version of upload-artifact to @v4 use env variable to store project name add Ubuntu 24.04 add Qt 5.15 for Windows macos-11 is obsolete --- .github/workflows/cpp-qt-macos.yml | 18 +++++++++--------- .github/workflows/cpp-qt-ubuntu.yml | 23 ++++++++++------------- .github/workflows/cpp-qt-windows.yml | 19 +++++++++++++------ 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.github/workflows/cpp-qt-macos.yml b/.github/workflows/cpp-qt-macos.yml index e9d04015..1c68ac96 100644 --- a/.github/workflows/cpp-qt-macos.yml +++ b/.github/workflows/cpp-qt-macos.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ master ] +env: + project: 'minutor' + jobs: build: @@ -15,21 +18,18 @@ jobs: name: [macos-5.9, macos-5.12, macos-5.15] include: - name: macos-5.9 - os: macos-11 + os: macos-12 qt: '5.9.9' - artifact: minutor.dmg - name: macos-5.12 os: macos-12 qt: '5.12.12' - artifact: minutor.dmg - name: macos-5.15 os: macos-latest qt: '5.15.2' - artifact: minutor.dmg runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # - name: Cache Qt # id: cache-qt @@ -54,16 +54,16 @@ jobs: - name: Build (MacOS) working-directory: ../build run: | - qmake ${{ github.workspace }}/minutor.pro -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib + qmake ${{ github.workspace }}/${{ env.project }}.pro -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib make - name: Deploy Qt (macOS) working-directory: ../build run: | - macdeployqt minutor.app -codesign=- -dmg + macdeployqt ${{ env.project }}.app -codesign=- -dmg - name: Archive build result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Binary ${{ matrix.name }} - path: ${{ runner.workspace }}/build/${{ matrix.artifact }} + path: ${{ runner.workspace }}/build/${{ env.project }}.dmg diff --git a/.github/workflows/cpp-qt-ubuntu.yml b/.github/workflows/cpp-qt-ubuntu.yml index 7476ec93..f05a0c15 100644 --- a/.github/workflows/cpp-qt-ubuntu.yml +++ b/.github/workflows/cpp-qt-ubuntu.yml @@ -6,27 +6,27 @@ on: pull_request: branches: [ master ] +env: + project: 'minutor' + jobs: build: strategy: fail-fast: false matrix: - name: [ubuntu-20.04, ubuntu-22.04] + name: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] include: - # - name: ubuntu-18.04 - # os: ubuntu-18.04 - # artifact: minutor - name: ubuntu-20.04 os: ubuntu-20.04 - artifact: minutor - name: ubuntu-22.04 os: ubuntu-22.04 - artifact: minutor + - name: ubuntu-24.04 + os: ubuntu-24.04 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Qt run: | @@ -40,14 +40,11 @@ jobs: - name: Build (Ubuntu) working-directory: ../build run: | - qmake ${{ github.workspace }}/${{ matrix.artifact }}.pro + qmake ${{ github.workspace }}/${{ env.project }}.pro make - env: - # only needed for Ubuntu-16.04 - LD_LIBRARY_PATH: '${{ runner.workspace }}/Qt/5.5/gcc_64/lib' - name: Archive build result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Binary ${{ matrix.name }} - path: ${{ runner.workspace }}/build/${{ matrix.artifact }} + path: ${{ runner.workspace }}/build/${{ env.project }} diff --git a/.github/workflows/cpp-qt-windows.yml b/.github/workflows/cpp-qt-windows.yml index f52aff6d..51f9c356 100644 --- a/.github/workflows/cpp-qt-windows.yml +++ b/.github/workflows/cpp-qt-windows.yml @@ -6,26 +6,33 @@ on: pull_request: branches: [ master ] +env: + project: 'minutor' + jobs: build: strategy: fail-fast: false matrix: - name: [windows-5.9, windows-5.12] + name: [windows-5.9, windows-5.12, windows-5.15] include: - name: windows-5.9 os: windows-2019 qt: '5.9.9' msvc_toolset: '14.16' - name: windows-5.12 - os: windows-latest + os: windows-2022 qt: '5.12.12' msvc_toolset: '14.29' + - name: windows-5.15 + os: windows-2022 + qt: '5.15.2' + msvc_toolset: '14.29' runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ilammy/msvc-dev-cmd@v1 with: toolset: ${{ matrix.msvc_toolset }} @@ -56,19 +63,19 @@ jobs: working-directory: ../build shell: cmd run: | - qmake ${{ github.workspace }}/minutor.pro + qmake ${{ github.workspace }}/${{ env.project }}.pro nmake - name: Deploy Qt (Windows) working-directory: ../build shell: cmd run: | - cp ..\build\release\minutor.exe ..\deploy\minutor.exe + cp ..\build\release\${{ env.project }}.exe ..\deploy\${{ env.project }}.exe windeployqt ..\deploy # todo: we have to add OpenSSL DLLs here - name: Archive build result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Binary ${{ matrix.name }} path: ${{ runner.workspace }}/deploy/*