Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
UjuiUjuMandan committed Jan 5, 2025
1 parent ba4ca65 commit f75a39c
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,12 @@ jobs:
submodules: 'recursive'
fetch-depth: '0'

- name: Prepare build dir
run: |
mkdir ${{ github.workspace }}/build
- name: Fetch AndroidLibV2rayLite
run: |
cd ${{ github.workspace }}/build
git clone --depth=1 -b master https://github.com/2dust/AndroidLibV2rayLite.git
cd AndroidLibV2rayLite
git submodule update --init
- name: Restore cached libtun2socks
id: cache-libtun2socks-restore
uses: actions/cache/restore@v4
with:
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') }}
path: ${{ github.workspace }}/AndroidLibXrayLite/libs
key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/refs/heads/main') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/libancillary/HEAD') }}

- name: Setup Android NDK
uses: nttld/setup-ndk@v1
Expand All @@ -62,7 +51,7 @@ jobs:
- name: Build libtun2socks
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
run: |
cd ${{ github.workspace }}/build/AndroidLibV2rayLite
cd ${{ github.workspace }}/AndroidLibXrayLite
bash compile-tun2socks.sh
tar -xvzf libtun2socks.so.tgz
env:
Expand All @@ -72,12 +61,12 @@ jobs:
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
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') }}
path: ${{ github.workspace }}/AndroidLibXrayLite/libs
key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/refs/heads/main') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/AndroidLibXrayLite/modules/libancillary/HEAD') }}

- name: Copy libtun2socks
run: |
cp -r ${{ github.workspace }}/build/AndroidLibV2rayLite/libs ${{ github.workspace }}/V2rayNG/app
cp -r ${{ github.workspace }}/AndroidLibXrayLite/libs ${{ github.workspace }}/V2rayNG/app
- name: Fetch AndroidLibXrayLite tag
run: |
Expand Down

0 comments on commit f75a39c

Please sign in to comment.