mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
Disable CGO for cross-compilation releases
CGO_ENABLED=0 uses pure Go fallbacks for lux/accel. For native builds with CGO acceleration, build locally with CGO_ENABLED=1.
This commit is contained in:
@@ -21,26 +21,6 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.25.5'
|
go-version: '1.25.5'
|
||||||
- name: Set up arm64 cross compiler
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y update
|
|
||||||
sudo apt-get -y install gcc-aarch64-linux-gnu
|
|
||||||
- name: Checkout osxcross
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: tpoechtrager/osxcross
|
|
||||||
path: osxcross
|
|
||||||
- name: Build osxcross
|
|
||||||
run: |
|
|
||||||
sudo apt-get -y install clang llvm-dev libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip sed cpio libbz2-dev
|
|
||||||
cd osxcross
|
|
||||||
wget https://github.com/joseluisq/macosx-sdks/releases/download/12.3/$MACOS_SDK_FNAME -O tarballs/$MACOS_SDK_FNAME
|
|
||||||
echo $MACOS_SDK_CHECKSUM tarballs/$MACOS_SDK_FNAME | sha256sum -c -
|
|
||||||
UNATTENDED=1 ./build.sh
|
|
||||||
echo $PWD/target/bin >> $GITHUB_PATH
|
|
||||||
env:
|
|
||||||
MACOS_SDK_FNAME: MacOSX12.3.sdk.tar.xz
|
|
||||||
MACOS_SDK_CHECKSUM: 3abd261ceb483c44295a6623fdffe5d44fc4ac2c872526576ec5ab5ad0f6e26c
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -49,5 +29,4 @@ jobs:
|
|||||||
args: release --clean
|
args: release --clean
|
||||||
workdir: ./netrunner/
|
workdir: ./netrunner/
|
||||||
env:
|
env:
|
||||||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
+3
-16
@@ -14,22 +14,9 @@ builds:
|
|||||||
- amd64
|
- amd64
|
||||||
- arm64
|
- arm64
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=1
|
# CGO disabled for cross-compilation - uses pure Go fallbacks
|
||||||
- CGO_CFLAGS=-O -D__BLST_PORTABLE__ # Set the CGO flags to use the portable version of BLST
|
# For native builds with CGO acceleration, build locally with CGO_ENABLED=1
|
||||||
overrides:
|
- CGO_ENABLED=0
|
||||||
- goos: linux
|
|
||||||
goarch: arm64
|
|
||||||
env:
|
|
||||||
- CC=aarch64-linux-gnu-gcc
|
|
||||||
- goos: darwin
|
|
||||||
goarch: arm64
|
|
||||||
env:
|
|
||||||
- CC=oa64-clang
|
|
||||||
- goos: darwin
|
|
||||||
goarch: amd64
|
|
||||||
goamd64: v1
|
|
||||||
env:
|
|
||||||
- CC=o64-clang
|
|
||||||
release:
|
release:
|
||||||
# Repo in which the release will be created.
|
# Repo in which the release will be created.
|
||||||
# Default is extracted from the origin remote URL or empty if its private hosted.
|
# Default is extracted from the origin remote URL or empty if its private hosted.
|
||||||
|
|||||||
Reference in New Issue
Block a user