Skip to content

Commit

Permalink
Update to Qt install action v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ntadej committed May 21, 2024
1 parent ba8ff0a commit 9f92c31
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/actions/qt5-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
set -x

export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
export PATH="$Qt5_Dir/bin:$PATH"
export PATH="$QT_ROOT_DIR/bin:$PATH"
qmake --version

# Main project
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/qt6-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
set -x

export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
export PATH="$Qt6_DIR/bin:$PATH"
export PATH="$QT_ROOT_DIR/bin:$PATH"
qmake --version

# Main project
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,9 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Download Qt (desktop)
id: qt-desktop
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
modules: qtlocation qtpositioning
set-env: false

- name: Download Qt (Android)
- name: Download Qt
id: qt-android
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
Expand All @@ -111,8 +102,8 @@ jobs:
- name: Fix Qt release
if: ${{ matrix.abi }} == 'armeabi-v7a'
run: |
chmod +x "$Qt6_DIR/bin/qt-cmake"
sed -i "s/C:\/Qt\/Qt-${QT_VERSION}/\/usr\/local\/Qt-${QT_VERSION}/g" "$Qt6_DIR/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake"
chmod +x "$QT_ROOT_DIR/bin/qt-cmake"
sed -i "s/C:\/Qt\/Qt-${QT_VERSION}/\/usr\/local\/Qt-${QT_VERSION}/g" "$QT_ROOT_DIR/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake"
- name: Set up OpenJDK 17
uses: actions/setup-java@v4
Expand All @@ -134,7 +125,7 @@ jobs:
ANDROID_ABI: ${{ matrix.abi }}
working-directory: source
run: |
export QT_HOST_PATH="$(readlink -f "$Qt6_DIR/../gcc_64")"
export QT_HOST_PATH="$(readlink -f "$QT_ROOT_DIR/../gcc_64")"
cmake --workflow --preset Android-ccache
- name: Upload artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
rm -rf lcov
- name: Download Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 || true
- name: Download Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,8 @@ jobs:
with:
xcode-version: latest-stable

- name: Download Qt (desktop)
uses: jurplel/install-qt-action@v3
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
target: desktop
modules: qtlocation qtpositioning
set-env: false

- name: Download Qt (iOS)
uses: jurplel/install-qt-action@v3
- name: Download Qt
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
Expand All @@ -96,7 +87,7 @@ jobs:
- name: Build
working-directory: source
run: |
export QT_HOST_PATH="$(readlink -f "$Qt6_DIR/../macos")"
export QT_HOST_PATH="$(readlink -f "$QT_ROOT_DIR/../macos")"
cmake --workflow --preset ${PRESET}
- name: Upload installation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
} >> "$GITHUB_ENV"
- name: Download Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
aqtversion: ==3.1.*
version: ${{ matrix.qt_version }}
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/Android.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"displayName": "Android configuration using Qt6",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build/qt6-Android",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"ANDROID_ABI": "$penv{ANDROID_ABI}"
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/Linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"displayName": "Linux configuration using Qt6",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build/qt6-Linux",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"QT_VERSION_MAJOR": "6"
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/WASM.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"displayName": "WASM configuration using Qt6",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build/qt6-WASM",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"MLN_QT_WITH_LOCATION": "OFF"
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/Windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"displayName": "Windows configuration using Qt6",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceParentDir}/build/qt6-Windows",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_CONFIGURATION_TYPES": "Release;Debug"
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/iOS.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"displayName": "iOS configuration using Qt6",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceParentDir}/build/qt6-iOS",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_CONFIGURATION_TYPES": "Release;Debug",
"CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
Expand Down
2 changes: 1 addition & 1 deletion cmake/presets/macOS.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"displayName": "macOS configuration using Qt6",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/build/qt6-macOS",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64",
Expand Down
2 changes: 1 addition & 1 deletion examples/quick/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"displayName": "MapLibre Qt Quick example configuration",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/../../build/qt6-example-quick",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"displayName": "MapLibre Qt Widgets example configuration",
"generator": "Ninja",
"binaryDir": "${sourceParentDir}/../../build/qt6-example-widgets",
"toolchainFile": "$penv{Qt6_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"toolchainFile": "$penv{QT_ROOT_DIR}/lib/cmake/Qt6/qt.toolchain.cmake",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
Expand Down

0 comments on commit 9f92c31

Please sign in to comment.