mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Workflows: Build Android(7+) using NDK; Add Android(7+) amd64 build (#4664)
Makes net.LookupIP() work on Android builds
This commit is contained in:
parent
aa4134f4a6
commit
16641fc4b5
1 changed files with 19 additions and 1 deletions
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
|
@ -42,6 +42,11 @@ jobs:
|
||||||
- goos: android
|
- goos: android
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
# END Android ARM 8
|
# END Android ARM 8
|
||||||
|
# BEGIN Android AMD64
|
||||||
|
- goos: android
|
||||||
|
goarch: amd64
|
||||||
|
patch-assetname: android-amd64
|
||||||
|
# END Android AMD64
|
||||||
# Windows ARM
|
# Windows ARM
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
|
@ -104,6 +109,19 @@ jobs:
|
||||||
- name: Checkout codebase
|
- name: Checkout codebase
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up NDK
|
||||||
|
if: matrix.goos == 'android'
|
||||||
|
run: |
|
||||||
|
wget -qO android-ndk.zip https://dl.google.com/android/repository/android-ndk-r28b-linux.zip
|
||||||
|
unzip android-ndk.zip
|
||||||
|
rm android-ndk.zip
|
||||||
|
declare -A arches=(
|
||||||
|
["amd64"]="x86_64-linux-android24-clang"
|
||||||
|
["arm64"]="aarch64-linux-android24-clang"
|
||||||
|
)
|
||||||
|
echo CC="$(realpath android-ndk-*/toolchains/llvm/prebuilt/linux-x86_64/bin)/${arches[${{ matrix.goarch }}]}" >> $GITHUB_ENV
|
||||||
|
echo CGO_ENABLED=1 >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Show workflow information
|
- name: Show workflow information
|
||||||
run: |
|
run: |
|
||||||
_NAME=${{ matrix.patch-assetname }}
|
_NAME=${{ matrix.patch-assetname }}
|
||||||
|
@ -119,7 +137,7 @@ jobs:
|
||||||
|
|
||||||
- name: Get project dependencies
|
- name: Get project dependencies
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
|
||||||
- name: Build Xray
|
- name: Build Xray
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build_assets
|
mkdir -p build_assets
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue