Switch to alpine for Linux builds

This commit is contained in:
Scott Yeager
2025-10-09 17:05:32 -07:00
parent 1b6f7a2a84
commit bbae80c1bb

View File

@@ -16,10 +16,10 @@ jobs:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
os: alpine-latest
short-name: linux-i64
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
os: alpine-latest
short-name: linux-arm64
arch: arm64
- target: aarch64-apple-darwin
@@ -29,7 +29,7 @@ jobs:
# os: macos-13
# short-name: macos-i64
runs-on: ${{ matrix.os }}
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
@@ -38,11 +38,16 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: latest-stable
xcode-version: latest-stable
- name: Check out repository code
uses: actions/checkout@v4
# - name: Setup dependencies on Alpine
# if: runner.os == 'Linux'
# run: |
# sudo apk add --no-cache gcc musl-dev openssl-dev openssl-libs-static
- name: Setup V & Herolib
id: setup
run: |
@@ -59,12 +64,16 @@ jobs:
timeout-minutes: 15
run: |
set -e
v -w -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }}
if [ "${{ runner.os }}" = "Linux" ]; then
v -w -d use_openssl -enable-globals -cflags -cc gcc -static cli/hero.v -o cli/hero-${{ matrix.target }}
else
v -w -d use_openssl -enable-globals cli/hero.v -o cli/hero-${{ matrix.target }}
fi
- name: Upload
uses: actions/upload-artifact@v4
with:
name: hero-${{ matrix.target }}
path: cli/hero-${{ matrix.target }}
path: cli/hero-${{ matrix.target }}
release_hero:
needs: build