From 9bad589784f7a5a1640352dd703127e3ff3a21db Mon Sep 17 00:00:00 2001 From: Alex Uskov Date: Fri, 29 Mar 2024 07:15:27 +0400 Subject: [PATCH] Update ndk to r27 --- .github/actions/canary-ndk/action.yml | 35 +++++++++++++++++++++++++++ .github/workflows/main.yml | 12 ++++++--- .github/workflows/publish.yml | 15 +++++++----- qpm.json | 2 +- 4 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 .github/actions/canary-ndk/action.yml diff --git a/.github/actions/canary-ndk/action.yml b/.github/actions/canary-ndk/action.yml new file mode 100644 index 0000000..6454ad5 --- /dev/null +++ b/.github/actions/canary-ndk/action.yml @@ -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} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d9fcc7..867c26d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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}} @@ -41,7 +45,7 @@ jobs: run: | cd ${GITHUB_WORKSPACE} pwsh -Command ./build.ps1 - qpm-rust qmod build + qpm qmod build - name: Create Qmod run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2bd52d1..83bff26 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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: | diff --git a/qpm.json b/qpm.json index 489b30a..29e54c7 100644 --- a/qpm.json +++ b/qpm.json @@ -22,7 +22,7 @@ }, { "id": "beatsaber-hook", - "versionRange": "^5.1.2", + "versionRange": "^5.1.6", "additionalData": {} }, {