Skip to content

Commit

Permalink
Remove Qt 5 support
Browse files Browse the repository at this point in the history
As time goes by, it becomes more and more laborious to maintain two
major Qt versions in parallel.

We had many workarounds and missing features for the Qt 5 version, which
had its last public release almost 4 years ago.

Additionally, the system requirements for Qt 6 are not unreasonable, so
the majority of people should be able to run it.

So, for those reasons, we decided to remove Qt 5 support completely.

Users that can't run the Qt 6 version for whatever reason, are free to
either disable updates and stay on Notes 2.3.x, or manually build Notes
off of the "qt5" branch.

Co-authored-by: guihkx <[email protected]>
  • Loading branch information
zjeffer and guihkx committed Oct 25, 2024
1 parent b824ab5 commit bfb0827
Show file tree
Hide file tree
Showing 28 changed files with 68 additions and 1,432 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

jobs:
deb:
name: deb (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
name: deb (${{ matrix.build-type }}, Qt 6, ${{ matrix.image }})
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -18,20 +18,12 @@ jobs:
fail-fast: false
matrix:
include:
# Ubuntu's release cycle: https://wiki.ubuntu.com/Releases
- image: ubuntu-20_04
build-script: ubuntu_deb_entrypoint.sh
qt-version-major: 5
build-type: release

- image: ubuntu-22_04
build-script: ubuntu_deb_entrypoint.sh
qt-version-major: 6
build-type: release

- image: ubuntu-23_10
build-script: ubuntu_deb_entrypoint.sh
qt-version-major: 6
build-type: release
steps:
- name: Checkout code
Expand Down Expand Up @@ -75,7 +67,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ steps.build.outputs.deb_name }}-qt${{ matrix.qt-version-major }}-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
name: ${{ steps.build.outputs.deb_name }}-qt6-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
path: ${{ steps.build.outputs.deb_path }}

- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -104,7 +96,7 @@ jobs:
tags: ${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}

rpm:
name: rpm (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
name: rpm (${{ matrix.build-type }}, Qt 6, ${{ matrix.image }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -113,13 +105,11 @@ jobs:
# Fedora's release cycle: https://endoflife.date/fedora
- image: fedora-38
build-script: rpm_entrypoint.sh
qt-version-major: 6
build-type: release

# openSUSE's release cycle: https://endoflife.date/opensuse
- image: opensuse-15_5
build-script: rpm_entrypoint.sh
qt-version-major: 6
build-type: release
steps:
- name: Checkout code
Expand Down Expand Up @@ -163,7 +153,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: ${{ steps.build.outputs.rpm_name }}-qt${{ matrix.qt-version-major }}-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
name: ${{ steps.build.outputs.rpm_name }}-qt6-${{ steps.build.outputs.distro_name }}-${{ matrix.build-type }}
path: ${{ steps.build.outputs.rpm_path }}

- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -192,20 +182,14 @@ jobs:
tags: ${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}

appimage:
name: AppImage (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
name: AppImage (${{ matrix.build-type }}, Qt 6, ${{ matrix.image }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: appimage-qt5
build-script: appimage_entrypoint.sh
qt-version-major: 5
build-type: release

- image: appimage-qt6
build-script: appimage_entrypoint.sh
qt-version-major: 6
build-type: release
steps:
- name: Checkout code
Expand Down Expand Up @@ -246,7 +230,6 @@ jobs:
run: docker run --rm -v "${GITHUB_OUTPUT}:/GITHUB_OUTPUT" -v "$(pwd):/src" -t '${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}' -t ${{ matrix.build-type }} ${{ github.ref_type == 'tag' && '-n' || ' ' }}

- name: (FIXME) Run qmllint
if: endsWith(matrix.image, 'qt6')
run: docker run --rm -v "$(pwd):/src" --entrypoint '' -t '${{ env.REGISTRY }}/nuttyartist/notes:${{ matrix.image }}' cmake --build build --target all_qmllint || true

- name: Upload AppImage artifact
Expand Down
56 changes: 8 additions & 48 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,23 @@ jobs:
# So it doesn't make much sense to have different build types other than 'debug' here.
# The release dmg is built using aqtinstall instead (the job below this one).
build-homebrew:
name: Build (${{ matrix.build-type }}, homebrew (qt${{ matrix.qt-version-major }}), ${{ matrix.os }})
name: Build (${{ matrix.build-type }}, homebrew (qt6), ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-13
qt-version-major: 5
build-type: debug

- os: macos-13
qt-version-major: 6
build-type: debug
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Qt ${{ matrix.qt-version-major }} (homebrew)
run: |
brew install ninja qt@${{ matrix.qt-version-major }}
- name: Configure Qt ${{ matrix.qt-version-major }} (homebrew)
if: matrix.qt-version-major == 5
- name: Install Qt 6 (homebrew)
run: |
brew link qt@${{ matrix.qt-version-major }}
cat << EOF
LDFLAGS="-L/usr/local/opt/qt@${{ matrix.qt-version-major }}/lib"
export CPPFLAGS="-I/usr/local/opt/qt@${{ matrix.qt-version-major }}/include"
export PATH="/usr/local/opt/qt@${{ matrix.qt-version-major }}/bin:$PATH"
EOF >> ~/.bashrc
brew install ninja qt@6
- name: Setup CLang problem matcher
# Technically, this action only supports GCC, but it seems to work well for Clang too.
Expand All @@ -55,13 +40,10 @@ jobs:
cmake . --warn-uninitialized --warn-unused-vars \
-G Ninja -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@${{ matrix.qt-version-major }})" \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@6)" \
-DPRO_VERSION=OFF
cmake --build build
# Build the dmg disk image using the official Qt 5 release downloaded by aqtinstall.
# This is also done for Linux and Windows, just to make sure we use the exact same Qt version across all three OSes.
#
# NOTE: This job uses a fixed Qt version (set in the 'qt-version' key below)!
# So, remember to keep it updated whenever a new Qt version is available on aqtinstall.
dmg-aqtinstall:
Expand All @@ -71,10 +53,6 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-13
qt-version: 5.15.2
build-type: release

- os: macos-13
qt-version: 6.5.2
build-type: release
Expand All @@ -98,11 +76,7 @@ jobs:
then
version="${version}+g${GITHUB_SHA::7}"
fi
arches='x86_64'
if [[ '${{ matrix.qt-version }}' == 6.* ]]
then
arches+='-arm64'
fi
arches='x86_64-arm64'
artifact_name="Notes_${version}-Qt${{ matrix.qt-version }}-${arches}"
if [ '${{ matrix.build-type }}' == 'debug' ]
then
Expand All @@ -126,23 +100,20 @@ jobs:
- name: Build (${{ matrix.build-type }})
env:
# Only commercial Qt 5 supports targeting Apple Silicon at the moment:
# https://www.qt.io/blog/qt-on-apple-silicon
TARGET_ARCH: ${{ startsWith(matrix.qt-version, '6.') && 'x86_64;arm64' || 'x86_64' }}
TARGET_ARCH: x86_64;arm64
VERBOSE: 1
run: |
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)
cmake . --warn-uninitialized --warn-unused-vars \
-B build -G Ninja \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ startsWith(matrix.qt-version, '6.') && '11.0' || '10.15' }} \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DGIT_REVISION=${{ github.ref_type != 'tag' && 'ON' || 'OFF' }} \
-DCMAKE_OSX_ARCHITECTURES="${{ env.TARGET_ARCH }}" \
-DCMAKE_OSX_ARCHITECTURES='x86_64;arm64' \
-DPRO_VERSION=OFF
cmake --build build
- name: (FIXME) Run qmllint
if: startsWith(matrix.qt-version, '6.')
run: |
cmake --build build --target all_qmllint || true
Expand All @@ -158,17 +129,6 @@ jobs:
mv Notes.app 'Notes Better.app'
macdeployqt 'Notes Better.app' -qmldir=../src/qml -appstore-compliant
- name: Remove unnecessary Qt plugins and libraries
run: |
set -x
set -e
cd 'build/Notes Better.app'
if [[ '${{ matrix.qt-version }}' == 5.* ]]
then
# The bearer plugin has caused problems for us in the past. Plus, it was removed altogether in Qt 6.
rm -rv Contents/PlugIns/bearer
fi
- name: Import signing certificate
if: github.repository == 'nuttyartist/notes' && github.event_name != 'pull_request'
run: |
Expand Down
Loading

0 comments on commit bfb0827

Please sign in to comment.