Skip to content

Commit

Permalink
match ndk version
Browse files Browse the repository at this point in the history
  • Loading branch information
UjuiUjuMandan committed Dec 23, 2024
1 parent f30137e commit 6b59a38
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,21 @@ jobs:
path: ${{ github.workspace }}/build/AndroidLibV2rayLite/libs
key: libtun2socks-${{ runner.os }}-${{ hashFiles('build/AndroidLibV2rayLite/.git/refs/heads/master') }}-${{ hashFiles('build/AndroidLibV2rayLite/.git/modules/badvpn/HEAD') }}-${{ hashFiles('build/AndroidLibV2rayLite/.git/modules/libancillary/HEAD') }}

- name: Setup Android NDK
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'

- name: Fetch AndroidLibXrayLite
run: |
cd ${{ github.workspace }}/build
git clone --depth=1 -b main https://github.com/UjuiUjuMandan/AndroidLibXrayLite.git
- name: Restore cached libv2ray
id: cache-libv2ray-restore
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/build/AndroidLibXrayLite/
key: libv2ray-${{ runner.os }}-${{ hashFiles('build/AndroidLibXrayLite/.git/refs/heads/main') }}

- name: Setup Android NDK
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true' || steps.cache-libv2ray-restore.outputs.cache-hit != 'true'
uses: nttld/setup-ndk@v1
id: setup-ndk
# Same version as https://gitlab.com/fdroid/fdroiddata/metadata/com.v2ray.ang.yml
Expand Down Expand Up @@ -60,18 +73,6 @@ jobs:
run: |
cp -r ${{ github.workspace }}/build/AndroidLibV2rayLite/libs/* ${{ github.workspace }}/V2rayNG/app/libs/
- name: Fetch AndroidLibXrayLite
run: |
cd ${{ github.workspace }}/build
git clone --depth=1 -b main https://github.com/UjuiUjuMandan/AndroidLibXrayLite.git
- name: Restore cached libv2ray
id: cache-libv2ray-restore
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/build/AndroidLibXrayLite/
key: libv2ray-${{ runner.os }}-${{ hashFiles('build/AndroidLibXrayLite/.git/refs/heads/main') }}

- name: Setup Golang
if: steps.cache-libv2ray-restore.outputs.cache-hit != 'true'
uses: actions/setup-go@v5
Expand All @@ -92,6 +93,8 @@ jobs:
gomobile init
go mod tidy -v
gomobile bind -trimpath -buildvcs=false -v -androidapi 21 -ldflags='-s -w -buildid=' ./
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}

- name: Save libv2ray
if: steps.cache-libv2ray-restore.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 6b59a38

Please sign in to comment.