From f254f10494f93c84fa09a545b10d3c6a6b7029cc Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 23 Nov 2021 14:22:26 +0100 Subject: [PATCH] Update release creation to use maintained action Also adds checksums from release artifacts to release description. --- .github/workflows/main.yml | 121 +++++++++-------------------- CI/macos/build_qt.sh | 1 + CI/macos/patches/QTBUG-97855.patch | 10 +++ 3 files changed, 47 insertions(+), 85 deletions(-) create mode 100644 CI/macos/patches/QTBUG-97855.patch diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f2554e78..dd7806895 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -149,23 +149,6 @@ jobs: ${{ github.workspace }}/macos_build_temp/srt-${{ env.LIBSRT_VERSION }} key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.FFMPEG_DEP_HASH }} - - name: 'Restore ntv2 from cache' - id: ntv2-cache - uses: actions/cache@v2.1.6 - env: - CACHE_NAME: 'ntv2-${{ matrix.arch }}-${{ env.CACHE_REVISION }}' - with: - path: ${{ github.workspace }}/macos_build_temp/ntv2-${{ env.NTV2_VERSION }} - key: ${{ runner.os }}-deps-${{ env.CACHE_NAME }}-${{ env.NTV2_VERSION }} - - - name: 'Build dependency ntv2' - if: steps.ntv2-cache.outputs.cache-hit != 'true' - run: CI/macos/build_ntv2.sh -s -a ${{ matrix.arch }} - - - name: 'Install dependency ntv2' - if: steps.ntv2-cache.outputs.cache-hit == 'true' - run: CI/macos/build_ntv2.sh -s -a ${{ matrix.arch }} --install - - name: 'Build dependency libpng' if: steps.ffmpeg-deps-cache.outputs.cache-hit != 'true' run: CI/macos/build_libpng.sh -s -a ${{ matrix.arch }} @@ -288,6 +271,23 @@ jobs: path: ${{ github.workspace }}/macos_build_temp/speexdsp-SpeexDSP-${{ env.SPEEXDSP_VERSION }} key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.SPEEXDSP_VERSION }} + - name: 'Restore ntv2 from cache' + id: ntv2-cache + uses: actions/cache@v2.1.6 + env: + CACHE_NAME: 'ntv2-${{ matrix.arch }}-${{ env.CACHE_REVISION }}' + with: + path: ${{ github.workspace }}/macos_build_temp/ntv2-${{ env.NTV2_VERSION }} + key: ${{ runner.os }}-deps-${{ env.CACHE_NAME }}-${{ env.NTV2_VERSION }} + + - name: 'Build dependency ntv2' + if: steps.ntv2-cache.outputs.cache-hit != 'true' + run: CI/macos/build_ntv2.sh -s -a ${{ matrix.arch }} + + - name: 'Install dependency ntv2' + if: steps.ntv2-cache.outputs.cache-hit == 'true' + run: CI/macos/build_ntv2.sh -s -a ${{ matrix.arch }} --install + - name: 'Build dependency SpeexDSP' if: steps.speexdsp-cache.outputs.cache-hit != 'true' run: CI/macos/build_speexdsp.sh -s -a ${{ matrix.arch }} @@ -619,17 +619,6 @@ jobs: id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: 'Create Release' - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.get_version.outputs.VERSION }} - release_name: OBS Deps build ${{ steps.get_version.outputs.VERSION }} - draft: false - prerelease: false - - name: 'Download x86_64 deps artifact' uses: actions/download-artifact@v2 with: @@ -660,62 +649,24 @@ jobs: with: name: macos-deps-qt-${{ env.CURRENT_DATE }}-universal.tar.xz - - name: 'Upload macOS x86_64 package to release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/macos-deps-${{ env.CURRENT_DATE }}-x86_64.tar.xz - asset_name: macos-deps-${{ steps.get_version.outputs.VERSION }}-x86_64.tar.xz - asset_content_type: application/octet-stream - - - name: 'Upload macOS Qt x86_64 package to release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/macos-deps-qt-${{ env.CURRENT_DATE }}-x86_64.tar.xz - asset_name: macos-deps-qt-${{ steps.get_version.outputs.VERSION }}-x86_64.tar.xz - asset_content_type: application/octet-stream - - - name: 'Upload macOS arm64 package to release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/macos-deps-${{ env.CURRENT_DATE }}-arm64.tar.xz - asset_name: macos-deps-${{ steps.get_version.outputs.VERSION }}-arm64.tar.xz - asset_content_type: application/octet-stream - - - name: 'Upload macOS Qt arm64 package to release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/macos-deps-qt-${{ env.CURRENT_DATE }}-arm64.tar.xz - asset_name: macos-deps-qt-${{ steps.get_version.outputs.VERSION }}-arm64.tar.xz - asset_content_type: application/octet-stream - - - name: 'Upload macOS universal package to release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/macos-deps-${{ env.CURRENT_DATE }}-universal.tar.xz - asset_name: macos-deps-${{ steps.get_version.outputs.VERSION }}-universal.tar.xz - asset_content_type: application/octet-stream + - name: 'Generate checksums' + run: | + echo "### Checksums\n" > ${{ github.workspace }}/RELEASE.txt + find . -name "macos-deps-*.tar.xz" -print0 | sort -z | xargs -0 -n 1 -P 1 -I {} sh -c "echo \" \$(basename {}): \$(sha256sum {} | cut -c 1-64)\" >> ${{ github.workspace }}/RELEASE.txt" - - name: 'Upload macOS Qt universal package to release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Create Release' + id: create_release + uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/macos-deps-qt-${{ env.CURRENT_DATE }}-universal.tar.xz - asset_name: macos-deps-qt-${{ steps.get_version.outputs.VERSION }}-universal.tar.xz - asset_content_type: application/octet-stream + draft: false + prerelease: false + tag_name: ${{ steps.get_version.outputs.VERSION }} + name: "OBS macOS Deps Build ${{ steps.get_version.outputs.VERSION }}" + body_path: ${{ github.workspace }}/RELEASE.txt + files: | + ${{ github.workspace }}/macos-deps-${{ env.CURRENT_DATE }}-x86_64.tar.xz + ${{ github.workspace }}/macos-deps-${{ env.CURRENT_DATE }}-arm64.tar.xz + ${{ github.workspace }}/macos-deps-${{ env.CURRENT_DATE }}-universal.tar.xz + ${{ github.workspace }}/macos-deps-qt-${{ env.CURRENT_DATE }}-x86_64.tar.xz + ${{ github.workspace }}/macos-deps-qt-${{ env.CURRENT_DATE }}-arm64.tar.xz + ${{ github.workspace }}/macos-deps-qt-${{ env.CURRENT_DATE }}-universal.tar.xz diff --git a/CI/macos/build_qt.sh b/CI/macos/build_qt.sh index d7ff9bfb7..9b0896952 100755 --- a/CI/macos/build_qt.sh +++ b/CI/macos/build_qt.sh @@ -17,6 +17,7 @@ _patch_product() { if [ -z "${SKIP_UNPACK}" ]; then step "Apply patches..." apply_patch "${CHECKOUT_DIR}/CI/patches/QTBUG-74606.patch" "6ba73e94301505214b85e6014db23b042ae908f2439f0c18214e92644a356638" + apply_patch "${CHECKOUT_DIR}/CI/macos/patches/QTBUG-97855.patch" "d8620262ad3f689fdfe6b6e277ddfdd3594db3de9dbc65810a871f142faa9966" apply_patch "${CHECKOUT_DIR}/CI/macos/patches/QTBUG-90370.patch" "277b16f02f113e60579b07ad93c35154d7738a296e3bf3452182692b53d29b85" find . -type f -name "*.pro" -print0 | xargs -0 -I{} sh -c "echo '\n\nCONFIG += sdk_no_version_check' >> {}" fi diff --git a/CI/macos/patches/QTBUG-97855.patch b/CI/macos/patches/QTBUG-97855.patch new file mode 100644 index 000000000..04efe5cc1 --- /dev/null +++ b/CI/macos/patches/QTBUG-97855.patch @@ -0,0 +1,10 @@ +--- ./qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h 2020-10-27 09:02:11.000000000 +0100 ++++ ./qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h 2021-11-23 20:32:10.000000000 +0100 +@@ -41,6 +41,7 @@ + #define QIOSURFACEGRAPHICSBUFFER_H + + #include ++#include + #include + + QT_BEGIN_NAMESPACE