diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd531ee76..6f2ce45c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,13 +47,6 @@ jobs: - name: Setup Android environment uses: android-actions/setup-android@v3 - - name: Restore cached libtun2socks - id: cache-libtun2socks-restore - uses: actions/cache/restore@v4 - with: - path: ${{ github.workspace }}/AndroidLibXrayLite/libs - key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/libancillary/HEAD') }} - - name: Setup Android NDK uses: nttld/setup-ndk@v1 id: setup-ndk @@ -74,6 +67,13 @@ jobs: echo "Changed $(basename "$link") from $current_target to $new_target" done + - name: Restore cached libtun2socks + id: cache-libtun2socks-restore + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/AndroidLibXrayLite/libs + key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/libancillary/HEAD') }} + - name: Build libtun2socks if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true' run: | @@ -188,13 +188,6 @@ jobs: - name: Setup Android environment uses: android-actions/setup-android@v3 - - name: Restore cached libtun2socks - id: cache-libtun2socks-restore - uses: actions/cache/restore@v4 - with: - path: ${{ github.workspace }}/AndroidLibXrayLite/libs - key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/libancillary/HEAD') }} - - name: Setup Android NDK uses: nttld/setup-ndk@v1 id: setup-ndk @@ -215,6 +208,13 @@ jobs: echo "Changed $(basename "$link") from $current_target to $new_target" done + - name: Restore cached libtun2socks + id: cache-libtun2socks-restore + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/AndroidLibXrayLite/libs + key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/libancillary/HEAD') }} + - name: Build libtun2socks if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true' run: |