Skip to content

Commit

Permalink
Update GitHub actions to more recent versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBriza committed Oct 11, 2024
1 parent 93c83bd commit feb64d6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 46 deletions.
70 changes: 33 additions & 37 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,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 @@ -102,7 +102,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 @@ -131,34 +131,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:
host: 'linux'
version: ${{env.QT_VERSION}}
set-env: false
aqtversion: '==3.1.*'
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:
host: 'linux'
version: ${{env.QT_VERSION}}
target: android
arch: android_armv7
aqtversion: '==3.1.*'
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 @@ -174,7 +172,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 @@ -195,34 +193,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}}
set-env: false
aqtversion: '==3.1.*'
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: desktop
arch: wasm_singlethread
modules: ${{env.QT_MODULES}}
aqtversion: '==3.1.*'
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 @@ -239,13 +235,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 @@ -256,23 +252,23 @@ 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}}
cache: true
cache-key-prefix: ${{ github.job }}-qt

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
uses: microsoft/setup-msbuild@v2
- name: Build the application
shell: bash
run: |
Expand All @@ -281,7 +277,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 @@ -292,11 +288,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 @@ -324,15 +320,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 @@ -345,7 +341,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 @@ -366,7 +362,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 @@ -413,15 +409,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 @@ -438,13 +434,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 feb64d6

Please sign in to comment.