diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 5f7e6f8d..6a7027e3 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -27,8 +27,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - with: - fetch-depth: 0 - name: Checkout repository submodules run: git submodule update --init --recursive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8de5afc5..a666e359 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,48 @@ jobs: - name: Checkout repository submodules run: git submodule update --init --recursive - + + - name: Get gl4es latest commit hash + id: gl4es-sha + run: echo "::set-output name=sha::$(echo $(git ls-remote https://github.com/PojavLauncherTeam/gl4es-114-extra refs/heads/master | grep -io '^\S*'))" + shell: bash + + - name: Cache gl4es + uses: actions/cache@v2 + id: gl4es-cache + with: + path: gl4es/libs + key: gl4es-holy-ios-shared-${{ steps.gl4es-sha.outputs.sha }} + + - name: Get gl4es + if: steps.gl4es-cache.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: 'PojavLauncherTeam/gl4es-114-extra' + path: 'gl4es' + + - name: Build gl4es + if: steps.gl4es-cache.outputs.cache-hit != 'true' + continue-on-error: true + run: | + cd gl4es + git config --global user.email "github-actions@users.noreply.github.com" + git config --global user.name "github-actions" + wget https://github.com/leetal/ios-cmake/raw/master/ios.toolchain.cmake + cmake -B build -DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake -DDEFAULT_ES=2 \ + -DNOX11=ON -DNOEGL=OFF -DSTATICLIB=OFF -DPLATFORM=OS64 \ + -DCMAKE_C_FLAGS=-Wno-error=implicit-function-declaration + cmake --build build --config RelWithDebInfo --target GL + cp -R lib/libGL.dylib ../Natives/resources/Frameworks/libgl4es_114.dylib + + - name: Push gl4es + if: github.event != 'pull_request' && github.ref_name == 'main' && steps.gl4es-cache.outputs.cache-hit != 'true' + continue-on-error: true + run: | + git add Natives/resources/Frameworks/libgl4es_114.dylib + git commit -am "CI: Update gl4es" + git push + - name: Get JRE8 uses: dawidd6/action-download-artifact@v2 with: