add -checklinkname=0 fix build error (#187)

* Update main.yml

* Update main.yml

* Update main.yml
This commit is contained in:
fuilloi authored and GitHub committed 2026-06-01 13:42:18 +08:00
1 parent daec0daf46
commit e194d22cf1
1 file changed
+9 -12
+9 -12
View File
@@ -13,19 +13,16 @@ on:
branches:
- main
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.0
uses: actions/checkout@v6
- name: Setup Golang
uses: actions/setup-go@v6.1.0
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
@@ -35,18 +32,18 @@ jobs:
export PATH=$PATH:~/go/bin
- name: Setup Android SDK
uses: android-actions/setup-android@v3.2.0
uses: android-actions/setup-android@v4
with:
log-accepted-android-sdk-licenses: false
cmdline-tools-version: '12266719'
packages: 'platforms;android-35 build-tools;35.0.0 platform-tools'
cmdline-tools-version: '14742923'
packages: 'platforms;android-37.0 build-tools;37.0.0 platform-tools'
- name: Install NDK
run: |
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
--channel=0 \
--install "ndk;28.2.13676358"
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/28.2.13676358" >> $GITHUB_ENV
--install "ndk;29.0.14206865"
echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/29.0.14206865" >> $GITHUB_ENV
- name: Build
run: |
@@ -55,11 +52,11 @@ jobs:
cp -v data/*.dat assets/
gomobile init
go mod tidy
gomobile bind -v -androidapi 24 -trimpath -ldflags='-s -w -buildid=' ./
gomobile bind -v -androidapi 24 -trimpath -ldflags='-s -w -buildid= -checklinkname=0' ./
- name: Upload build artifacts
if: github.event.inputs.release_tag == ''
uses: actions/upload-artifact@v6.0.0
uses: actions/upload-artifact@v7
with:
name: libv2ray
path: |