Skip to content

Commit

Permalink
Update CI to Qt 6.7.2 (except wasm)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBriza committed Jul 2, 2024
1 parent 21b12e0 commit 99ae414
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 53 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ on:
branches: [ "master" ]

env:
QT_VERSION: '6.6.3'
QT_VERSION: '6.7.2'
QT_MODULES: 'qtmultimedia qtwebsockets qtimageformats'
EM_VERSION: '3.1.37'

jobs:
analyze:
Expand Down Expand Up @@ -48,7 +47,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Make
run: |
Expand All @@ -57,15 +56,15 @@ jobs:
- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
Expand All @@ -74,7 +73,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -94,7 +93,7 @@ jobs:
mkdir build
cd build
export CPM_SOURCE_CACHE=~/cpm-cache
export CMAKE_PREFIX_PATH="$Qt6_DIR"/lib/cmake
export CMAKE_PREFIX_PATH="$QT_ROOT_DIR"/lib/cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} -DLITH_FORCE_DOWNLOAD_DEPENDENCIES=ON
make -j5
Expand All @@ -109,6 +108,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
73 changes: 37 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:
create:

env:
QT_VERSION: '6.6.3'
QT_VERSION: '6.7.2'
QT_MODULES: 'qtmultimedia qtwebsockets qtimageformats'
EM_VERSION: '3.1.37'
WASM_QT_VERSION: '6.6.3'
EM_VERSION: '3.1.25'

permissions:
contents: write
Expand Down Expand Up @@ -59,23 +60,23 @@ jobs:
- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Host Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
set-env: false
modules: ${{env.QT_MODULES}} qtquick3d
cache: true
cache-key-prefix: ${{ github.job }}-qt-host
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
target: ios
Expand All @@ -90,7 +91,7 @@ jobs:
IMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} bash ./dist/ios/build.sh
- name: Upload artifacts to GitHub
if: github.event_name != 'create'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Lith.ipa
path: build_ios/Lith.ipa
Expand Down Expand Up @@ -119,32 +120,32 @@ jobs:

- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Host Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
host: linux
set-env: false
modules: ${{env.QT_MODULES}}
cache: true
cache-key-prefix: ${{ github.job }}-qt-host
cache-key-prefix: ${{ github.job }}-qt-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
host: linux
target: android
arch: android_armv7
modules: ${{env.QT_MODULES}}
cache: true
cache-key-prefix: ${{ github.job }}-qt
cache-key-prefix: ${{ github.job }}-qt-cross-${{ env.QT_VERSION }}

- name: Get OpenSSL
run: |
Expand All @@ -160,7 +161,7 @@ jobs:
IMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} bash ./dist/android/build.sh
- name: Upload artifacts to GitHub
if: github.event_name != 'create'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: android-build-debug.apk
path: build_android/app/android-build/Lith.apk
Expand All @@ -181,32 +182,32 @@ jobs:

- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Host Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
version: ${{env.WASM_QT_VERSION}}
set-env: false
cache: true
cache-key-prefix: ${{ github.job }}-qt-host
cache-key-prefix: ${{ github.job }}-qt-${{ env.QT_VERSION }}
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
version: ${{env.WASM_QT_VERSION}}
host: linux
target: desktop
arch: wasm_singlethread
modules: ${{env.QT_MODULES}}
cache: true
cache-key-prefix: ${{ github.job }}-qt
cache-key-prefix: ${{ github.job }}-qt-cross-${{ env.QT_VERSION }}

- uses: mymindstorm/setup-emsdk@v11
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}

Expand All @@ -223,13 +224,13 @@ jobs:
uses: actions/configure-pages@v3
- name: Upload artifact
if: github.event_name == 'create'
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: 'installed/'
- name: Deploy to GitHub Pages
id: deployment
if: github.event_name == 'create'
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

Windows-MSVC:
runs-on: windows-2019
Expand All @@ -240,15 +241,15 @@ jobs:

- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
Expand All @@ -265,7 +266,7 @@ jobs:
mkdir build_win
cd build_win
export CPM_SOURCE_CACHE=~/cpm-cache
export CMAKE_PREFIX_PATH="$Qt6_DIR"/lib/cmake
export CMAKE_PREFIX_PATH="$QT_ROOT_DIR"/lib/cmake
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} -DVERSION=$VERSION_NAME
cmake --build . --config Release
cmake --install . --config Release
Expand All @@ -276,11 +277,11 @@ jobs:
cp build_win/installed/bin/* build_win/composed
cp -r build_win/installed/lib/modules build_win/composed/
cd build_win/composed
"$Qt6_DIR"/bin/windeployqt.exe Lith.exe LithCore.dll LithStyle.dll LithUI.dll --verbose 2 --release --compiler-runtime --qmldir ../..
"$QT_ROOT_DIR"/bin/windeployqt.exe Lith.exe LithCore.dll LithStyle.dll LithUI.dll --verbose 2 --release --compiler-runtime --qmldir ../..
7z a ../../Lith.zip *
- name: Upload artifacts to GitHub
if: github.event_name != 'create'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Lith.zip
path: Lith.zip
Expand Down Expand Up @@ -308,15 +309,15 @@ jobs:
- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
Expand All @@ -329,7 +330,7 @@ jobs:
cd build
export CPM_SOURCE_CACHE=~/cpm-cache
export VERSION_NAME=$(./dist/get-version-name.sh)
export CMAKE_PREFIX_PATH="$Qt6_DIR"/lib/cmake
export CMAKE_PREFIX_PATH="$QT_ROOT_DIR"/lib/cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} -DVERSION=$VERSION_NAME -DLITH_FORCE_DOWNLOAD_DEPENDENCIES=ON
make -j5
Expand All @@ -350,7 +351,7 @@ jobs:
manifest-path: "dist/linux/flatpak/app.Lith.Lith.json"
- name: Upload artifacts to GitHub
if: github.event_name != 'create'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: app.Lith.Lith.flatpak
path: app.Lith.Lith.flatpak
Expand Down Expand Up @@ -397,15 +398,15 @@ jobs:

- name: Set up CPM cache
id: cache-cpm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/cpm-cache
key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
Expand All @@ -422,13 +423,13 @@ jobs:
# A workaround mentioned here https://github.com/actions/runner-images/issues/7522
echo killing...; sudo pkill -9 XProtect >/dev/null || true;
echo waiting...; while pgrep XProtect; do sleep 3; done;
"$Qt6_DIR"/bin/macdeployqt build_macos/app/Lith.app -qmldir=modules -appstore-compliant #-codesign=Z52EFCPL6D
"$QT_ROOT_DIR"/bin/macdeployqt build_macos/app/Lith.app -qmldir=modules -appstore-compliant #-codesign=Z52EFCPL6D
# No idea why but macdeployqt deploys debug libs too, just remove them, maybe fix this sometimes
for i in `find build_macos/app/Lith.app/ -name '*.dSYM'`; do rm -fr "$i"; done
"$Qt6_DIR"/bin/macdeployqt build_macos/app/Lith.app -no-plugins -dmg -always-overwrite -appstore-compliant
"$QT_ROOT_DIR"/bin/macdeployqt build_macos/app/Lith.app -no-plugins -dmg -always-overwrite -appstore-compliant
- name: Upload artifacts to GitHub
if: github.event_name != 'create'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Lith.dmg
path: build_macos/app/Lith.dmg
Expand Down
6 changes: 3 additions & 3 deletions dist/android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if [ -z "${ANDROID_OPENSSL_PATH}" ]; then
ANDROID_OPENSSL_PATH="${ANDROID_SDK_ROOT}/android_openssl/ssl_3"
fi

export QT_HOST_PATH="${Qt6_DIR}/../gcc_64"
export CMAKE_PREFIX_PATH=${Qt6_DIR}/lib/cmake
cmake .. -DQT_DEBUG_FIND_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DANDROID_OPENSSL_PATH="${ANDROID_OPENSSL_PATH}" -DQT_ANDROID_BUILD_ALL_ABIS=ON
export QT_HOST_PATH="${QT_ROOT_DIR}/../gcc_64"
export CMAKE_PREFIX_PATH=${QT_ROOT_DIR}/lib/cmake
cmake .. -DQT_DEBUG_FIND_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DANDROID_OPENSSL_PATH="${ANDROID_OPENSSL_PATH}" -DQT_ANDROID_BUILD_ALL_ABIS=ON

cmake --build . --target Lith -- -j2
cmake --build . --target apk -- -j2
Expand Down
4 changes: 2 additions & 2 deletions dist/ios/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -x
mkdir build_ios
cd build_ios

export QT_HOST_PATH="${Qt6_DIR}/../macos"
cmake .. -GXcode -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DVERSION=$VERSION_NAME -DIOS_DEVELOPMENT_TEAM_ID=Z52EFCPL6D -DIMGUR_API_KEY=$IMGUR_API_KEY
export QT_HOST_PATH="${QT_ROOT_DIR}/../macos"
cmake .. -GXcode -DCMAKE_PREFIX_PATH=$QT_ROOT_DIR -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DVERSION=$VERSION_NAME -DIOS_DEVELOPMENT_TEAM_ID=Z52EFCPL6D -DIMGUR_API_KEY=$IMGUR_API_KEY

xcodebuild -project Lith.xcodeproj -destination generic/platform=iOS -scheme Lith -configuration Release DEVELOPMENT_TEAM=Z52EFCPL6D build
xcodebuild -project Lith.xcodeproj -scheme Lith -configuration Release archive -archivePath Lith.xcarchive DEVELOPMENT_TEAM=Z52EFCPL6D
Expand Down
2 changes: 1 addition & 1 deletion dist/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

mkdir build_macos
cd build_macos
export CMAKE_PREFIX_PATH=$Qt6_DIR/lib/cmake
export CMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DVERSION=$VERSION_NAME -DCMAKE_INSTALL_PREFIX=installed
cmake --build . --parallel
6 changes: 3 additions & 3 deletions dist/wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -x
mkdir build_wasm
pushd build_wasm

export QT_HOST_PATH="${Qt6_DIR}/../gcc_64"
export CMAKE_PREFIX_PATH=$Qt6_DIR/lib/cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake
export QT_HOST_PATH="${QT_ROOT_DIR}/../gcc_64"
export CMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake
cmake --build .
cmake --install .

0 comments on commit 99ae414

Please sign in to comment.