Skip to content

Commit

Permalink
add submodule AndroidLibV2rayLite
Browse files Browse the repository at this point in the history
  • Loading branch information
UjuiUjuMandan committed Jan 4, 2025
1 parent e769b8e commit ecbf650
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'

- 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
submodules: 'recursive'

- 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 }}/AndroidLibV2rayLite/libs
key: libtun2socks-${{ runner.os }}-${{ hashFiles('AndroidLibV2rayLite/.git/refs/heads/master') }}-${{ hashFiles('AndroidLibV2rayLite/.git/modules/badvpn/HEAD') }}-${{ hashFiles('AndroidLibV2rayLite/.git/modules/libancillary/HEAD') }}

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

- name: Copy libtun2socks
run: |
cp -r ${{ github.workspace }}/build/AndroidLibV2rayLite/libs ${{ github.workspace }}/V2rayNG/app
cp -r ${{ github.workspace }}/AndroidLibV2rayLite/libs ${{ github.workspace }}/V2rayNG/app
- name: Fetch AndroidLibXrayLite tag
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "AndroidLibXrayLite"]
path = AndroidLibXrayLite
url = https://github.com/2dust/AndroidLibXrayLite
[submodule "AndroidLibV2rayLite"]
path = AndroidLibV2rayLite
url = https://github.com/2dust/AndroidLibV2rayLite
1 change: 1 addition & 0 deletions AndroidLibV2rayLite
Submodule AndroidLibV2rayLite added at f1c405

0 comments on commit ecbf650

Please sign in to comment.