From 0d90a6684d129decd1a1a8515b1f109c6033b7bc Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sun, 28 Feb 2021 16:05:58 +0000 Subject: [PATCH 01/11] CI: add github action to build source release tarball with submodules whenever a release is created on github using "make new release", CI will automatically create a tarball containing all sources including submodules and upload it. this makes it much easier for distros to build ppsspp using their existing workflow, without having to resort to running git from build scripts. fixes #13973 fixes #11090 --- .github/workflows/build_source_release.yml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build_source_release.yml diff --git a/.github/workflows/build_source_release.yml b/.github/workflows/build_source_release.yml new file mode 100644 index 0000000000..7bd0bc5cea --- /dev/null +++ b/.github/workflows/build_source_release.yml @@ -0,0 +1,39 @@ +name: Build Source Release + +# Trigger whenever a release is created +on: + release: + types: + - created + +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v1 + with: + submodules: true + + - name: archive + id: archive + run: | + VERSION=$(printf "%s\n" ${{ github.event.release.tag_name }} | sed 's/^v//') + PKGNAME="ppsspp-$VERSION" + mkdir -p /tmp/$PKGNAME + mv * /tmp/$PKGNAME + mv /tmp/$PKGNAME . + TARBALL=$PKGNAME.tar.xz + tar cJf $TARBALL $PKGNAME + echo "::set-output name=tarball::$TARBALL" + + - name: upload tarball + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./${{ steps.archive.outputs.tarball }} + asset_name: ${{ steps.archive.outputs.tarball }} + asset_content_type: application/gzip From 3b767a4101d330b3d3aae1a0bf1eac03884ceb13 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 14:28:14 +0000 Subject: [PATCH 02/11] use recursive submodules and checkoutv2 --- .github/workflows/build_source_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_source_release.yml b/.github/workflows/build_source_release.yml index 7bd0bc5cea..15bfd193d3 100644 --- a/.github/workflows/build_source_release.yml +++ b/.github/workflows/build_source_release.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: - submodules: true + submodules: recursive - name: archive id: archive From 96abab9c9f61fb57f8231097f50749d8b9df41ae Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 14:29:10 +0000 Subject: [PATCH 03/11] rename to tarball.yml --- .github/workflows/{build_source_release.yml => tarball.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build_source_release.yml => tarball.yml} (100%) diff --git a/.github/workflows/build_source_release.yml b/.github/workflows/tarball.yml similarity index 100% rename from .github/workflows/build_source_release.yml rename to .github/workflows/tarball.yml From bff3dfe880407fb8689044f27d65e1b492b1d500 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 14:30:01 +0000 Subject: [PATCH 04/11] rename action title --- .github/workflows/tarball.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 15bfd193d3..d760ca1d67 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -1,4 +1,4 @@ -name: Build Source Release +name: Generate Source Tarball # Trigger whenever a release is created on: From 71ad10b98e8021bce40d3e1b734a0ae84c07aa1c Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 14:51:10 +0000 Subject: [PATCH 05/11] fix mime type of xz tarball --- .github/workflows/tarball.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index d760ca1d67..b1478649db 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -36,4 +36,4 @@ jobs: upload_url: ${{ github.event.release.upload_url }} asset_path: ./${{ steps.archive.outputs.tarball }} asset_name: ${{ steps.archive.outputs.tarball }} - asset_content_type: application/gzip + asset_content_type: application/x-xz From e9ae4ac9d7b148e172693a4cf46e5a480bc7fd6d Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 14:59:12 +0000 Subject: [PATCH 06/11] remove pre-built ffmpeg and vulkan libraries --- .github/workflows/tarball.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index b1478649db..135c750da5 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -24,6 +24,8 @@ jobs: mkdir -p /tmp/$PKGNAME mv * /tmp/$PKGNAME mv /tmp/$PKGNAME . + find ffmpeg -name '*.a' -delete + find ext -name '*.dylib' -delete TARBALL=$PKGNAME.tar.xz tar cJf $TARBALL $PKGNAME echo "::set-output name=tarball::$TARBALL" From 80cbe20ed55f9d238a490ee08e30ad4dd034c321 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 15:18:11 +0000 Subject: [PATCH 07/11] try 2: remove pre-built ffmpeg and vulkan libraries --- .github/workflows/tarball.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 135c750da5..287337fb24 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -24,8 +24,8 @@ jobs: mkdir -p /tmp/$PKGNAME mv * /tmp/$PKGNAME mv /tmp/$PKGNAME . - find ffmpeg -name '*.a' -delete - find ext -name '*.dylib' -delete + find $PKGNAME/ffmpeg -name '*.a' -delete + find $PKGNAME/ext -name '*.dylib' -delete TARBALL=$PKGNAME.tar.xz tar cJf $TARBALL $PKGNAME echo "::set-output name=tarball::$TARBALL" From 82c76c854a6a6d2e574f0ccfaf2ab14b60076dff Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 17:02:57 +0000 Subject: [PATCH 08/11] fix version number display --- .github/workflows/tarball.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 287337fb24..9f603d9d2a 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -26,6 +26,7 @@ jobs: mv /tmp/$PKGNAME . find $PKGNAME/ffmpeg -name '*.a' -delete find $PKGNAME/ext -name '*.dylib' -delete + sed -i "s;unknown;${VERSION};" $PKGNAME/build/git-version.cpp TARBALL=$PKGNAME.tar.xz tar cJf $TARBALL $PKGNAME echo "::set-output name=tarball::$TARBALL" From 32f54ba40d01ea8163eeeb607e6d764f6f898497 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 17:13:30 +0000 Subject: [PATCH 09/11] fix version string generation --- .github/workflows/tarball.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 9f603d9d2a..9865d790a6 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -26,7 +26,7 @@ jobs: mv /tmp/$PKGNAME . find $PKGNAME/ffmpeg -name '*.a' -delete find $PKGNAME/ext -name '*.dylib' -delete - sed -i "s;unknown;${VERSION};" $PKGNAME/build/git-version.cpp + sed -i "s;unknown;${VERSION};" $PKGNAME/git-version.cmake || true TARBALL=$PKGNAME.tar.xz tar cJf $TARBALL $PKGNAME echo "::set-output name=tarball::$TARBALL" From 515278b7f603788a79a1a50d5bd9d579e228df70 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 20:52:22 +0000 Subject: [PATCH 10/11] also delete pre-built ffmpeg windows libraries --- .github/workflows/tarball.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 9865d790a6..8f31f5e6fc 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -25,6 +25,7 @@ jobs: mv * /tmp/$PKGNAME mv /tmp/$PKGNAME . find $PKGNAME/ffmpeg -name '*.a' -delete + find $PKGNAME/ffmpeg -name '*.lib' -delete find $PKGNAME/ext -name '*.dylib' -delete sed -i "s;unknown;${VERSION};" $PKGNAME/git-version.cmake || true TARBALL=$PKGNAME.tar.xz From cf1c77b0e7b2049cf821682e0dd1948cae8682d8 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 11 Feb 2022 23:32:41 +0000 Subject: [PATCH 11/11] remove more prebuilt stuff and huge rapidjson testsuite (unused) --- .github/workflows/tarball.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 8f31f5e6fc..add0f685d8 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -24,9 +24,14 @@ jobs: mkdir -p /tmp/$PKGNAME mv * /tmp/$PKGNAME mv /tmp/$PKGNAME . - find $PKGNAME/ffmpeg -name '*.a' -delete - find $PKGNAME/ffmpeg -name '*.lib' -delete - find $PKGNAME/ext -name '*.dylib' -delete + find $PKGNAME/ffmpeg -name '*.a' -delete || true + find $PKGNAME/ffmpeg -name '*.lib' -delete || true + find $PKGNAME/ext -name '*.dylib' -delete || true + find $PKGNAME/ext -name '*.lib' -delete || true + find $PKGNAME/ext -name '*.so.*' -delete || true + find $PKGNAME/dx9sdk -name '*.lib' -delete || true + find $PKGNAME/dx9sdk -name '*.dll' -delete || true + rm -rf $PKGNAME/ext/rapidjson/thirdparty/gtest || true sed -i "s;unknown;${VERSION};" $PKGNAME/git-version.cmake || true TARBALL=$PKGNAME.tar.xz tar cJf $TARBALL $PKGNAME