From 28f3c2eb389bcf29909c5269110c6929f93f9e7d Mon Sep 17 00:00:00 2001 From: moonshadow565 Date: Sat, 11 May 2024 20:54:43 +0200 Subject: [PATCH] cleanup build actions --- .github/workflows/buildit.yaml | 9 ++--- .github/workflows/builditmac.yaml | 11 +++--- .github/workflows/buildqtmac.yaml | 37 -------------------- .github/workflows/qt.yaml | 35 +++++++++++++++++++ .github/workflows/qtmac.yaml | 34 ++++++++++++++++++ .github/workflows/release.yaml | 57 +++++++++++++++++++++++++++---- 6 files changed, 130 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/buildqtmac.yaml create mode 100644 .github/workflows/qt.yaml create mode 100644 .github/workflows/qtmac.yaml diff --git a/.github/workflows/buildit.yaml b/.github/workflows/buildit.yaml index 63f22fbd..8ec2e717 100644 --- a/.github/workflows/buildit.yaml +++ b/.github/workflows/buildit.yaml @@ -6,7 +6,7 @@ jobs: runs-on: windows-2022 steps: - name: "Clone source" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: 'true' - name: "Setup msvc" @@ -14,7 +14,8 @@ jobs: - name: "Download Qt5" shell: bash run: | - curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.5-x86_64-msvc-static.7z" + curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.13-x86_64-msvc-static.7z" + sha256sum C:/qt5.7z 7z x -oC:/ C:/qt5.7z - name: "Download patcher" shell: bash @@ -25,7 +26,7 @@ jobs: run: | mkdir build cd build - cmake -G "NMake Makefiles" "-DCMAKE_PREFIX_PATH:PATH=C:/qt5.15.5-x86_64-msvc-static" "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded" "-DCMAKE_BUILD_TYPE:STRING=Release" .. + cmake -G "NMake Makefiles" "-DCMAKE_PREFIX_PATH:PATH=C:/qt5.15.13-x86_64-msvc-static" "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded" "-DCMAKE_BUILD_TYPE:STRING=Release" .. cmake --build . - name: "Package" shell: bash @@ -33,7 +34,7 @@ jobs: ./make-release.sh build 7z a cslol-manager-windows.zip cslol-manager/ - name: 'Upload Artifact' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: cslol-manager-windows path: cslol-manager-windows.zip diff --git a/.github/workflows/builditmac.yaml b/.github/workflows/builditmac.yaml index 19c31fb9..7a7e6573 100644 --- a/.github/workflows/builditmac.yaml +++ b/.github/workflows/builditmac.yaml @@ -6,16 +6,17 @@ jobs: runs-on: macos-11 steps: - name: "Clone source" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: 'true' - name: "Download Qt5" run: | - curl --output qt5.15.8-x86_64-macos-static.tar.xz -L "https://github.com/LeagueToolkit/cslol-manager/releases/download/release23/qt5.15.8-x86_64-macos-static.tar.xz" - tar xf qt5.15.8-x86_64-macos-static.tar.xz --strip-components 2 -C $HOME + curl --output qt5.tar.xz -L "https://github.com/LeagueToolkit/cslol-manager/releases/download/release23/qt5.15.13-x86_64-macos-static.tar.xz" + shasum -a 256 qt5.tar.xz + tar xf qt5.tar.xz --strip-components 2 -C $HOME - name: "Build" run: | - cmake -DCMAKE_PREFIX_PATH=$HOME/qt5.15.8-x86_64-macos-static -DCMAKE_BUILD_TYPE=Release -B build -S . + cmake -DCMAKE_PREFIX_PATH=$HOME/qt5.15.13-x86_64-macos-static -DCMAKE_BUILD_TYPE=Release -B build -S . cmake --build build - name: "Package" shell: bash @@ -23,7 +24,7 @@ jobs: ./make-release-mac.sh "build" "cslol-manager-macos" tar caf cslol-manager-macos.tar.xz cslol-manager-macos/ - name: 'Upload Artifact' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: cslol-manager-macos path: cslol-manager-macos.tar.xz diff --git a/.github/workflows/buildqtmac.yaml b/.github/workflows/buildqtmac.yaml deleted file mode 100644 index 1aaa51b6..00000000 --- a/.github/workflows/buildqtmac.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: BuildQtMac -on: - workflow_dispatch: -jobs: - build: - runs-on: macos-11 - steps: - - name: "Clone source" - uses: actions/checkout@v2 - with: - submodules: 'true' - - name: "Clone Qt" - run: | - git clone https://github.com/qt/qt5 - pushd qt5 - git checkout v5.15.8-lts-lgpl - git submodule update --init {qtbase,qtsvg,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols2} - popd - - name: "Build" - run: | - mkdir qt5-build - pushd qt5-build - ../qt5/configure -platform macx-clang -prefix $HOME/qt5.15.8-x86_64-macos-static -release -static -opensource -confirm-license -no-pch -no-iconv -no-dbus -no-icu -no-fontconfig -no-freetype -qt-harfbuzz -qt-doubleconversion -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -nomake tools -nomake examples -nomake tests -no-feature-pdf -no-feature-sql -no-feature-sqlmodel -no-feature-testlib -no-feature-testlib_selfcover -no-feature-qml-profiler -no-feature-qml-preview - make - mkdir $HOME/qt5.15.8-x86_64-macos-static - make install - popd - - name: "Package" - shell: bash - run: | - tar caf qt5.15.8-x86_64-macos-static.tar.xz $HOME/qt5.15.8-x86_64-macos-static - - name: 'Upload Artifact' - uses: actions/upload-artifact@v2 - with: - name: qt5.15.8-x86_64-macos-static - path: qt5.15.8-x86_64-macos-static.tar.xz - retention-days: 15 diff --git a/.github/workflows/qt.yaml b/.github/workflows/qt.yaml new file mode 100644 index 00000000..7fa68fb1 --- /dev/null +++ b/.github/workflows/qt.yaml @@ -0,0 +1,35 @@ +name: Qt +on: + workflow_dispatch: +jobs: + build: + runs-on: windows-2022 + steps: + - name: "Setup msvc" + uses: ilammy/msvc-dev-cmd@v1 + - name: "Clone Qt" + shell: bash + run: | + git clone https://github.com/qt/qt5 + pushd qt5 + git checkout v5.15.13-lts-lgpl + git submodule update --init {qtbase,qtsvg,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols2,qtwinextras} + popd + - name: "Build" + run: | + mkdir qt5-build + cd qt5-build + ..\qt5\configure.bat -platform win32-msvc2019 -release -mp -static -static-runtime -opensource -confirm-license -opengl desktop -no-angle -no-pch -no-iconv -no-dbus -no-icu -no-fontconfig -no-freetype -no-openssl -schannel -qt-harfbuzz -qt-doubleconversion -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -nomake tools -nomake examples -nomake tests -feature-d3d12 -no-feature-pdf -no-feature-sql -no-feature-sqlmodel -no-feature-testlib -no-feature-testlib_selfcover -no-feature-qml-profiler -no-feature-qml-preview -prefix C:/qt5.15.13-x86_64-msvc-static + nmake + nmake install + - name: "Package" + shell: bash + run: | + 7z a qt5.15.13-x86_64-msvc-static.7z C:/qt5.15.13-x86_64-msvc-static + sha256sum qt5.15.13-x86_64-msvc-static.7z + - name: 'Upload Artifact' + uses: actions/upload-artifact@v4 + with: + name: qt5.15.13-x86_64-msvc-static + path: qt5.15.13-x86_64-msvc-static.7z + retention-days: 15 diff --git a/.github/workflows/qtmac.yaml b/.github/workflows/qtmac.yaml new file mode 100644 index 00000000..08672119 --- /dev/null +++ b/.github/workflows/qtmac.yaml @@ -0,0 +1,34 @@ +name: QtMac +on: + workflow_dispatch: +jobs: + build: + runs-on: macos-11 + steps: + - name: "Clone Qt" + run: | + git clone https://github.com/qt/qt5 + pushd qt5 + git checkout v5.15.13-lts-lgpl + git submodule update --init {qtbase,qtsvg,qtdeclarative,qtgraphicaleffects,qtimageformats,qtquickcontrols2} + popd + - name: "Build" + run: | + mkdir qt5-build + pushd qt5-build + ../qt5/configure -platform macx-clang -prefix $HOME/qt5.15.13-x86_64-macos-static -release -static -opensource -confirm-license -no-pch -no-iconv -no-dbus -no-icu -no-fontconfig -no-freetype -qt-harfbuzz -qt-doubleconversion -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -nomake tools -nomake examples -nomake tests -no-feature-pdf -no-feature-sql -no-feature-sqlmodel -no-feature-testlib -no-feature-testlib_selfcover -no-feature-qml-profiler -no-feature-qml-preview + make + mkdir $HOME/qt5.15.13-x86_64-macos-static + make install + popd + - name: "Package" + shell: bash + run: | + tar caf qt5.15.13-x86_64-macos-static.tar.xz $HOME/qt5.15.13-x86_64-macos-static + shasum -a 256 qt5.15.13-x86_64-macos-static.tar.xz + - name: 'Upload Artifact' + uses: actions/upload-artifact@v4 + with: + name: qt5.15.13-x86_64-macos-static + path: qt5.15.13-x86_64-macos-static.tar.xz + retention-days: 15 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3f867181..7deb727f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,11 +4,11 @@ on: tags: - "*-*-*-*" jobs: - build: + build_win: runs-on: windows-2022 steps: - name: "Clone source" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: 'true' - name: "Setup msvc" @@ -16,7 +16,8 @@ jobs: - name: "Download Qt5" shell: bash run: | - curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.5-x86_64-msvc-static.7z" + curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.13-x86_64-msvc-static.7z" + sha256sum C:/qt5.7z 7z x -oC:/ C:/qt5.7z - name: "Download patcher" shell: bash @@ -27,16 +28,58 @@ jobs: run: | mkdir build cd build - cmake -G "NMake Makefiles" "-DCMAKE_PREFIX_PATH:PATH=C:/qt5.15.5-x86_64-msvc-static" "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded" "-DCMAKE_BUILD_TYPE:STRING=Release" .. + cmake -G "NMake Makefiles" "-DCMAKE_PREFIX_PATH:PATH=C:/qt5.15.13-x86_64-msvc-static" "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded" "-DCMAKE_BUILD_TYPE:STRING=Release" .. cmake --build . - name: "Package" shell: bash run: | ./make-release.sh build 7z a cslol-manager-windows.exe -sfx7z.sfx cslol-manager/ + - name: 'Upload Artifact' + uses: actions/upload-artifact@v4 + with: + name: cslol-manager-windows + path: cslol-manager-windows.exe + retention-days: 15 + build_mac: + runs-on: macos-11 + steps: + - name: "Clone source" + uses: actions/checkout@v4 + with: + submodules: 'true' + - name: "Download Qt5" + run: | + curl --output qt5.tar.xz -L "https://github.com/LeagueToolkit/cslol-manager/releases/download/release23/qt5.15.13-x86_64-macos-static.tar.xz" + shasum -a 256 qt5.tar.xz + tar xf qt5.tar.xz --strip-components 2 -C $HOME + - name: "Build" + run: | + cmake -DCMAKE_PREFIX_PATH=$HOME/qt5.15.13-x86_64-macos-static -DCMAKE_BUILD_TYPE=Release -B build -S . + cmake --build build + - name: "Package" + shell: bash + run: | + ./make-release-mac.sh "build" "cslol-manager-macos" + tar caf cslol-manager-macos.tar.xz cslol-manager-macos/ + - name: 'Upload Artifact' + uses: actions/upload-artifact@v4 + with: + name: cslol-manager-macos + path: cslol-manager-macos.tar.xz + retention-days: 15 + release: + needs: [build_win, build_mac] + runs-on: ubuntu-22.04 + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true - name: Build Changelog id: github_release - uses: mikepenz/release-changelog-builder-action@v3 + uses: mikepenz/release-changelog-builder-action@v4 with: failOnError: 'true' commitMode: 'true' @@ -57,8 +100,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "Release" - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: - files: cslol-manager-windows.exe + files: artifacts/* prerelease: ${{ endsWith(github.ref_name, '-prerelease') || endsWith(github.ref_name, '-test') }} body: ${{ steps.github_release.outputs.changelog }}