From d4b9356321138c65cb59b37428acedfe8a738110 Mon Sep 17 00:00:00 2001 From: AdamN <7974720+anr2me@users.noreply.github.com> Date: Sun, 24 Dec 2023 01:28:29 +0700 Subject: [PATCH] Create manual_generate_ipa.yml Manually generate iOS IPA on-demand --- .github/workflows/manual_generate_ipa.yml | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/manual_generate_ipa.yml diff --git a/.github/workflows/manual_generate_ipa.yml b/.github/workflows/manual_generate_ipa.yml new file mode 100644 index 000000000000..11f96385ce0e --- /dev/null +++ b/.github/workflows/manual_generate_ipa.yml @@ -0,0 +1,83 @@ +name: Manual Generate IPA +on: + workflow_dispatch: + inputs: + + buildVariant: + type: choice + description: 'Build Variant' + required: true + default: 'release' + options: + - release + - debug + +jobs: + + apk: + name: Generate ${{ github.event.inputs.buildVariant }} IPA + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + + #- name: Fetch tags for macOS + # # This is required for git describe --always to work for git-version.cpp. + # run: | + # git fetch --deepen=15000 --no-recurse-submodules --tags || exit 0 + + - name: Set Env Var(s) + run: | + echo "GIT_VERSION=$(git describe --always)" >> $GITHUB_ENV + + - name: Create macOS git-version.cpp & Version.txt + run: | + echo "const char *PPSSPP_GIT_VERSION = \"${GIT_VERSION}\";" > git-version.cpp + echo "#define PPSSPP_GIT_VERSION_NO_UPDATE 1" >> git-version.cpp + # Create Version.txt file (should probably do this during building process) + mkdir build-ios + mkdir build-ios/PPSSPP.app + echo $(echo $GIT_VERSION | cut -c 2-) > build-ios/PPSSPP.app/Version.txt + # Testing values ... + echo "Content of [GITHUB_REF##*/] = ${GITHUB_REF##*/}" + echo $(echo $GIT_VERSION | cut -c 2-) + # Testing file location ... + find . -name "Version.txt" + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@main + with: + create-symlink: true + + - name: Execute build + env: + CC: clang + CXX: clang++ + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + ./b.sh --ios --${{ github.event.inputs.buildVariant }} + + - name: Package build + run: | + # Testing file location ... + find . -name "Version.txt" + find . -name "*.app" + mkdir ppsspp + if [ -e build*/PPSSPP.app ]; then + mkdir ppsspp/Payload + cp -a build*/PPSSPP.app ppsspp/Payload + # GitHub Actions zipping kills symlinks and permissions. + cd ppsspp + zip -qry PPSSPP.ipa Payload + rm -rf Payload + cd - + fi + + - name: Upload IPA + uses: actions/upload-artifact@v3 + with: + name: iOS-${{ github.event.inputs.buildVariant }} build + path: ppsspp/