mirror of
http://bgp.hk.skcks.cn:10088/github.com/oneclickvirt/ecs
synced 2026-04-20 21:01:12 +08:00
fix: darwin去除CGO编译需求,不再使用CGO进行编译(部分linux的C代码不可迁移)
This commit is contained in:
36
.github/workflows/build_binary.yaml
vendored
36
.github/workflows/build_binary.yaml
vendored
@@ -151,21 +151,21 @@ jobs:
|
||||
|
||||
- goos: darwin
|
||||
goarch: amd64
|
||||
cgo_enabled: "1"
|
||||
cc: "clang --target=x86_64-apple-darwin"
|
||||
cflags: "-O2 -arch x86_64 -mmacosx-version-min=10.12"
|
||||
cgo_enabled: "0"
|
||||
# cc: "clang --target=x86_64-apple-darwin"
|
||||
# cflags: "-O2 -arch x86_64 -mmacosx-version-min=10.12"
|
||||
ldflags: "-s -w"
|
||||
runner: ubuntu-latest
|
||||
requires_osxcross: true
|
||||
# requires_osxcross: true
|
||||
|
||||
- goos: darwin
|
||||
goarch: arm64
|
||||
cgo_enabled: "1"
|
||||
cc: "clang --target=aarch64-apple-darwin"
|
||||
cflags: "-O2 -arch arm64 -mmacosx-version-min=11.0"
|
||||
cgo_enabled: "0"
|
||||
# cc: "clang --target=aarch64-apple-darwin"
|
||||
# cflags: "-O2 -arch arm64 -mmacosx-version-min=11.0"
|
||||
ldflags: "-s -w"
|
||||
runner: ubuntu-latest
|
||||
requires_osxcross: true
|
||||
# requires_osxcross: true
|
||||
|
||||
- goos: linux
|
||||
goarch: arm
|
||||
@@ -257,16 +257,16 @@ jobs:
|
||||
sudo apt-get install -y build-essential ;;
|
||||
esac
|
||||
|
||||
- name: Install osxcross for Darwin
|
||||
if: matrix.requires_osxcross == true
|
||||
run: |
|
||||
git clone --depth=1 https://github.com/tpoechtrager/osxcross.git
|
||||
cd osxcross
|
||||
wget -nc https://github.com/joseluisq/macosx-sdks/releases/download/12.3/MacOSX12.3.sdk.tar.xz
|
||||
mv MacOSX12.3.sdk.tar.xz tarballs/
|
||||
UNATTENDED=yes OSX_VERSION_MIN=10.12 ./build.sh
|
||||
echo "$PWD/target/bin" >> $GITHUB_PATH
|
||||
echo "OSXCROSS_ROOT=$PWD" >> $GITHUB_ENV
|
||||
# - name: Install osxcross for Darwin
|
||||
# if: matrix.requires_osxcross == true
|
||||
# run: |
|
||||
# git clone --depth=1 https://github.com/tpoechtrager/osxcross.git
|
||||
# cd osxcross
|
||||
# wget -nc https://github.com/joseluisq/macosx-sdks/releases/download/12.3/MacOSX12.3.sdk.tar.xz
|
||||
# mv MacOSX12.3.sdk.tar.xz tarballs/
|
||||
# UNATTENDED=yes OSX_VERSION_MIN=10.12 ./build.sh
|
||||
# echo "$PWD/target/bin" >> $GITHUB_PATH
|
||||
# echo "OSXCROSS_ROOT=$PWD" >> $GITHUB_ENV
|
||||
|
||||
- name: Get latest tag
|
||||
id: tag
|
||||
|
||||
Reference in New Issue
Block a user