Skip to content

Commit

Permalink
Revert "add submodule AndroidLibV2rayLite"
Browse files Browse the repository at this point in the history
This reverts commit 816f75e.
  • Loading branch information
UjuiUjuMandan committed Jan 5, 2025
1 parent 3f04979 commit ba4ca65
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,23 @@ 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 }}/AndroidLibV2rayLite/libs
key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibV2rayLite/HEAD') }}
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
uses: nttld/setup-ndk@v1
Expand All @@ -51,7 +62,7 @@ jobs:
- name: Build libtun2socks
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
run: |
cd ${{ github.workspace }}/AndroidLibV2rayLite
cd ${{ github.workspace }}/build/AndroidLibV2rayLite
bash compile-tun2socks.sh
tar -xvzf libtun2socks.so.tgz
env:
Expand All @@ -61,12 +72,12 @@ jobs:
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/AndroidLibV2rayLite/libs
key: libtun2socks-${{ runner.os }}-${{ hashFiles('.git/modules/AndroidLibV2rayLite/HEAD') }}
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: Copy libtun2socks
run: |
cp -r ${{ github.workspace }}/AndroidLibV2rayLite/libs ${{ github.workspace }}/V2rayNG/app
cp -r ${{ github.workspace }}/build/AndroidLibV2rayLite/libs ${{ github.workspace }}/V2rayNG/app
- name: Fetch AndroidLibXrayLite tag
run: |
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "AndroidLibXrayLite"]
path = AndroidLibXrayLite
url = https://github.com/2dust/AndroidLibXrayLite
[submodule "AndroidLibV2rayLite"]
path = AndroidLibV2rayLite
url = https://github.com/2dust/AndroidLibV2rayLite
1 change: 0 additions & 1 deletion AndroidLibV2rayLite
Submodule AndroidLibV2rayLite deleted from f1c405
20 changes: 20 additions & 0 deletions AndroidLibV2rayLite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# AndroidLibV2rayLite

### Preparation
- latest Ubuntu environment
- At lease 30G free space
- Get Repo [AndroidLibV2rayLite](https://github.com/2dust/AndroidLibV2rayLite) or [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite)
### Prepare Go
- Go to https://golang.org/doc/install and install latest go
- Make sure `go version` works as expected
### Prepare gomobile
- Go to https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile and install gomobile
- export PATH=$PATH:~/go/bin
- Make sure `gomobile init` works as expected
### Prepare NDK
- Go to https://developer.android.com/ndk/downloads and install latest NDK
- export PATH=$PATH:<wherever you ndk is located>
- Make sure `ndk-build -v` works as expected
### Make
- sudo apt install make
- Read and understand [build script](https://github.com/2dust/AndroidLibV2rayLite/blob/master/Makefile)

0 comments on commit ba4ca65

Please sign in to comment.