Skip to content

Commit

Permalink
Update ndk to r27
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenAlex committed Mar 29, 2024
1 parent 0a4d141 commit 590361e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Setup canary ndk"
description: "Sets up canary ndk"
outputs:
ndk-path:
value: ${{ steps.path.outputs.path }}
description: "Output path of the ndk"
cache-hit:
value: ${{ steps.cache.outputs.cache-hit }}
description: "Whether a cache hit occurred for the ndk"
runs:
using: "composite"
steps:
- name: NDK cache
id: cache
uses: actions/cache@v3
with:
path: ${HOME}/android-ndk-r27-canary/
key: ${{ runner.os }}-ndk-r27-canary

- name: Download canary ndk
if: ${{ !steps.cache.outputs.cache-hit }}
env:
CANARY_URL: https://github.com/QuestPackageManager/ndk-canary-archive/releases/download/27.0.1/android-ndk-10883340-linux-x86_64.zip
run: wget ${CANARY_URL} -O ${HOME}/ndk.zip
shell: bash

- name: Unzip ndk
if: ${{ !steps.cache.outputs.cache-hit }}
run: 7z x "${HOME}/ndk.zip" -o"${HOME}/"
shell: bash

- name: Set output
id: path
shell: bash
run: echo "path=${HOME}/android-ndk-r27-canary" >> ${GITHUB_OUTPUT}
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ jobs:

- uses: seanmiddleditch/gha-setup-ninja@v3

# Use canary NDK to avoid lesser known compile bugs
- name: Setup canary NDK
id: setup-ndk
uses: ./.github/actions/canary-ndk

- name: Create ndkpath.txt
run: |
echo "$ANDROID_NDK_LATEST_HOME" > ${GITHUB_WORKSPACE}/ndkpath.txt
echo ${{ steps.setup-ndk.outputs.ndk-path }} > ${GITHUB_WORKSPACE}/ndkpath.txt
cat ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get QPM
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ jobs:

- uses: seanmiddleditch/gha-setup-ninja@v3

# Use canary NDK to avoid lesser known compile bugs
- name: Setup canary NDK
id: setup-ndk
uses: ./.github/actions/canary-ndk

- name: Create ndkpath.txt
run: |
echo "$ANDROID_NDK_LATEST_HOME" > ${GITHUB_WORKSPACE}/ndkpath.txt
echo ${{ steps.setup-ndk.outputs.ndk-path }} > ${GITHUB_WORKSPACE}/ndkpath.txt
cat ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get QPM
Expand Down

0 comments on commit 590361e

Please sign in to comment.