Try using Zig instead (#831)

This commit is contained in:
Evan Simkowitz 2024-09-24 20:26:04 -07:00 committed by GitHub
parent 203db99b5f
commit 76f4ec641c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -39,10 +39,10 @@ jobs:
sudo apt-get update
sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm squashfs-tools
# We use musl-gcc instead of glibc for cgo compilation as it is more-easily statically linked
- name: Setup musl-gcc (Linux only)
# We use Zig instead of glibc for cgo compilation as it is more-easily statically linked
- name: Setup Zig (Linux only)
if: matrix.platform == 'linux'
uses: ./.github/actions/setup-musl-gcc
run: sudo snap install zig --classic --beta
# The pre-installed version of the AWS CLI has a segfault problem so we'll install it via Homebrew instead.
- name: Upgrade AWS CLI (Mac only)

View File

@ -71,10 +71,10 @@ jobs:
go-version: stable
cache-dependency-path: |
go.sum
# We use musl-gcc instead of glibc for cgo compilation as it is more-easily statically linked
- name: Setup musl-gcc (Go only)
# We use Zig instead of glibc for cgo compilation as it is more-easily statically linked
- name: Setup Zig (Go only)
if: matrix.language == 'go'
uses: ./.github/actions/setup-musl-gcc
run: sudo snap install zig --classic --beta
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@ -95,7 +95,7 @@ tasks:
ARCHS:
sh: echo {{if eq "arm" ARCH}}arm64{{else}}{{ARCH}}{{end}}
GO_LDFLAGS: -linkmode 'external' -extldflags=-static
GO_ENV_VARS: CC=/usr/local/musl/bin/musl-gcc
GO_ENV_VARS: CC="zig cc"
build:server:internal:
requires: