Use composite action for setup-musl-gcc (#829)

This commit is contained in:
Evan Simkowitz 2024-09-24 19:53:57 -07:00 committed by GitHub
parent c79bcde76c
commit e58e791b13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 13 deletions

View File

@ -0,0 +1,13 @@
name: "Setup musl-gcc"
description: "Compile and install musl-gcc from source"
runs:
using: "composite"
steps:
- run: |
git clone https://git.musl-libc.org/git/musl
cd musl
./configure
make
sudo make install
shell: bash

View File

@ -37,17 +37,12 @@ jobs:
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm squashfs-tools build-essential
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)
if: matrix.platform == 'linux'
run: |
git clone https://git.musl-libc.org/git/musl
cd musl
./configure
make
sudo make install
uses: ./.github/actions/setup-musl-gcc
# 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

@ -74,12 +74,7 @@ jobs:
# We use musl-gcc instead of glibc for cgo compilation as it is more-easily statically linked
- name: Setup musl-gcc (Go only)
if: matrix.language == 'go'
run: |
git clone https://git.musl-libc.org/git/musl
cd musl
./configure
make
sudo make install
uses: ./.github/actions/setup-musl-gcc
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL