Skip to content

Commit

Permalink
update GitHub CI Actions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
EtlamGit committed Oct 7, 2024
1 parent 2bc87b1 commit 50d7eb4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cpp-qt-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ master ]

env:
project: 'minutor'

jobs:
build:

Expand All @@ -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
Expand All @@ -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
23 changes: 10 additions & 13 deletions .github/workflows/cpp-qt-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
19 changes: 13 additions & 6 deletions .github/workflows/cpp-qt-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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/*
Expand Down

0 comments on commit 50d7eb4

Please sign in to comment.