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 49a9e07 commit 9bad589
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 11 deletions.
35 changes: 35 additions & 0 deletions .github/actions/canary-ndk/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}
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ jobs:

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

- 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 rust
uses: Fernthedev/qpm-rust-action@main
- name: Get QPM
uses: Fernthedev/qpm-action@main
with:
#required
workflow_token: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -41,7 +45,7 @@ jobs:
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./build.ps1
qpm-rust qmod build
qpm qmod build
- name: Create Qmod
run: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,32 @@ jobs:

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

- 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 rust
uses: Fernthedev/qpm-rust-action@main
- name: Get QPM
uses: Fernthedev/qpm-action@main
with:
#required
workflow_token: ${{secrets.GITHUB_TOKEN}}

restore: true # will run restore on download
cache: true #will cache dependencies

- name: QPM Edit Version
run: |
qpm-rust package edit --version "${{ env.VERSION }}"
qpm package edit --version "${{ env.VERSION }}"
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./build.ps1
qpm-rust qmod build
qpm qmod build
- name: Create Qmod
run: |
Expand Down
2 changes: 1 addition & 1 deletion qpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"id": "beatsaber-hook",
"versionRange": "^5.1.2",
"versionRange": "^5.1.6",
"additionalData": {}
},
{
Expand Down

0 comments on commit 9bad589

Please sign in to comment.