|
| 1 | +name: Development build |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches-ignore: |
| 6 | + - 'l10n_main' |
| 7 | + types: [opened, reopened] |
| 8 | + push: |
| 9 | + branches-ignore: |
| 10 | + - 'l10n_main' |
| 11 | + workflow_dispatch: |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + name: Development build |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - platform: 2 |
| 20 | + platform_name: ios |
| 21 | + - platform: 7 |
| 22 | + platform_name: iossimulator |
| 23 | + - platform: 8 |
| 24 | + platform_name: tvossimulator |
| 25 | + |
| 26 | + runs-on: J316sAP |
| 27 | + steps: |
| 28 | + - name: Remove work folders |
| 29 | + run: | |
| 30 | + echo "before" |
| 31 | + ls -lah ./ |
| 32 | + rm -rf ./* || true |
| 33 | + rm -rf ./.??* || true |
| 34 | + echo "after" |
| 35 | + ls -lah ./ |
| 36 | + |
| 37 | + - name: Checkout repository |
| 38 | + uses: actions/checkout@main |
| 39 | + |
| 40 | + - name: Checkout repository submodules |
| 41 | + run: git submodule update --init --recursive |
| 42 | + |
| 43 | + - name: Get gl4es latest commit hash |
| 44 | + id: gl4es-sha |
| 45 | + run: echo "::set-output name=sha::$(echo $(git ls-remote https://github.com/PojavLauncherTeam/gl4es-114-extra refs/heads/master | grep -io '^\S*'))" |
| 46 | + shell: bash |
| 47 | + |
| 48 | + - name: Cache gl4es |
| 49 | + uses: actions/cache@main |
| 50 | + if: false # use gl4es 1.1.5 |
| 51 | + id: gl4es-cache |
| 52 | + with: |
| 53 | + path: gl4es/libs |
| 54 | + key: gl4es-holy-ios-shared-2-${{ steps.gl4es-sha.outputs.sha }} |
| 55 | + |
| 56 | + - name: Get gl4es |
| 57 | + if: false && steps.gl4es-cache.outputs.cache-hit != 'true' |
| 58 | + uses: actions/checkout@main |
| 59 | + with: |
| 60 | + repository: 'PojavLauncherTeam/gl4es-114-extra' |
| 61 | + path: 'gl4es' |
| 62 | + |
| 63 | + - name: Build gl4es |
| 64 | + if: false && steps.gl4es-cache.outputs.cache-hit != 'true' |
| 65 | + continue-on-error: true |
| 66 | + run: | |
| 67 | + cd gl4es |
| 68 | + git config user.email "github-actions@users.noreply.github.com" |
| 69 | + git config user.name "github-actions" |
| 70 | + export PATH=/opt/procursus/bin:$PATH |
| 71 | + wget https://github.com/leetal/ios-cmake/raw/master/ios.toolchain.cmake |
| 72 | + cmake -B build -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DDEFAULT_ES=2 \ |
| 73 | + -DNOX11=ON -DNOEGL=OFF -DSTATICLIB=OFF -DPLATFORM=OS64 \ |
| 74 | + -DCMAKE_C_FLAGS=-Wno-error=implicit-function-declaration |
| 75 | + cmake --build build --config RelWithDebInfo --target GL |
| 76 | + cp -R lib/libGL.dylib ../Natives/resources/Frameworks/libgl4es_114.dylib |
| 77 | + |
| 78 | + - name: Push gl4es |
| 79 | + if: false && github.event != 'pull_request' && github.ref_name == 'main' && steps.gl4es-cache.outputs.cache-hit != 'true' |
| 80 | + continue-on-error: true |
| 81 | + run: | |
| 82 | + git add Natives/resources/Frameworks/libgl4es_114.dylib |
| 83 | + git commit -am "CI: Update gl4es" |
| 84 | + git push |
| 85 | + |
| 86 | + - name: Get JRE8 |
| 87 | + uses: dawidd6/action-download-artifact@v2 |
| 88 | + with: |
| 89 | + github_token: ${{secrets.GITHUB_TOKEN}} |
| 90 | + workflow: build.yml |
| 91 | + path: depends |
| 92 | + workflow_conclusion: success |
| 93 | + allow_forks: false |
| 94 | + repo: PojavLauncherTeam/android-openjdk-build-multiarch |
| 95 | + branch: buildjre8 |
| 96 | + name: jre8-ios-aarch64 |
| 97 | + |
| 98 | + - name: Get JRE17 |
| 99 | + uses: dawidd6/action-download-artifact@v2 |
| 100 | + with: |
| 101 | + github_token: ${{secrets.GITHUB_TOKEN}} |
| 102 | + workflow: build.yml |
| 103 | + path: depends |
| 104 | + workflow_conclusion: completed |
| 105 | + allow_forks: false |
| 106 | + repo: PojavLauncherTeam/android-openjdk-build-multiarch |
| 107 | + branch: buildjre17-21 |
| 108 | + name: jre17-ios-aarch64 |
| 109 | + |
| 110 | + - name: Get JRE21 |
| 111 | + uses: dawidd6/action-download-artifact@v2 |
| 112 | + with: |
| 113 | + github_token: ${{secrets.GITHUB_TOKEN}} |
| 114 | + workflow: build.yml |
| 115 | + path: depends |
| 116 | + workflow_conclusion: completed |
| 117 | + allow_forks: false |
| 118 | + repo: PojavLauncherTeam/android-openjdk-build-multiarch |
| 119 | + branch: buildjre17-21 |
| 120 | + name: jre21-ios-aarch64 |
| 121 | + |
| 122 | + - name: Build for ${{ matrix.platform_name }} |
| 123 | + run: | |
| 124 | + export PATH=/opt/homebrew/bin:$PATH |
| 125 | + export RUNNER=1 SLIMMED=1 |
| 126 | + if [ "${{ matrix.platform_name }}" == "ios" ]; then |
| 127 | + # Build ipa and tipa for iOS |
| 128 | + gmake -j$(sysctl -n hw.ncpu) dsym package PLATFORM=${{ matrix.platform }} |
| 129 | + gmake -j$(sysctl -n hw.ncpu) dsym package PLATFORM=${{ matrix.platform }} TROLLSTORE_JIT_ENT=1 |
| 130 | + elif [ "${{ matrix.platform_name }}" == "tvos" ]; then |
| 131 | + # Build tipa only for tvOS |
| 132 | + gmake -j$(sysctl -n hw.ncpu) dsym package PLATFORM=${{ matrix.platform }} TROLLSTORE_JIT_ENT=1 |
| 133 | + else |
| 134 | + # Build ipa only for everything else |
| 135 | + gmake -j$(sysctl -n hw.ncpu) dsym package PLATFORM=${{ matrix.platform }} |
| 136 | + fi |
| 137 | + |
| 138 | + - name: Upload regular ipa |
| 139 | + uses: actions/upload-artifact@main |
| 140 | + with: |
| 141 | + name: org.angelauramc.amethyst-${{ matrix.platform_name }}.ipa |
| 142 | + path: artifacts/org.angelauramc.amethyst-*-${{ matrix.platform_name }}.ipa |
| 143 | + |
| 144 | + - name: Upload regular tipa |
| 145 | + uses: actions/upload-artifact@main |
| 146 | + with: |
| 147 | + name: org.angelauramc.amethyst-${{ matrix.platform_name }}-trollstore.tipa |
| 148 | + path: artifacts/org.angelauramc.amethyst-*-${{ matrix.platform_name }}-trollstore.tipa |
| 149 | + |
| 150 | + - name: Upload slimmed ipa |
| 151 | + uses: actions/upload-artifact@main |
| 152 | + with: |
| 153 | + name: org.angelauramc.amethyst.slimmed-${{ matrix.platform_name }}.ipa |
| 154 | + path: artifacts/org.angelauramc.amethyst.slimmed-*-${{ matrix.platform_name }}.ipa |
| 155 | + |
| 156 | + - name: Upload slimmed tipa |
| 157 | + uses: actions/upload-artifact@main |
| 158 | + with: |
| 159 | + name: org.angelauramc.amethyst.slimmed-${{ matrix.platform_name }}-trollstore.tipa |
| 160 | + path: artifacts/org.angelauramc.amethyst.slimmed-*-${{ matrix.platform_name }}-trollstore.tipa |
| 161 | + |
| 162 | + - name: Upload PojavLauncher.dSYM |
| 163 | + uses: actions/upload-artifact@main |
| 164 | + if: matrix.platform_name == 'ios' |
| 165 | + with: |
| 166 | + name: AngelAuraAmethyst.dSYM |
| 167 | + path: artifacts/AngelAuraAmethyst.dSYM |
0 commit comments