Skip to content

Commit

Permalink
GHA main: Add Alpine musl job
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Jan 18, 2025
1 parent 9de21fd commit d5bc515
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ jobs:
-DEXTRA_CXXFLAGS=-flto=full
with_pgo: true

- job_name: Alpine musl x86_64
os: ubuntu-latest
container_image: alpine:3.20
arch: x86_64
bootstrap_cmake_flags: -DBUILD_LTO_LIBS=ON
extra_cmake_flags: >-
-DBUILD_LTO_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
-DTEST_COMPILER_RT_LIBRARIES="profile;lsan;asan;msan;fuzzer"
-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++
-DJITRT_EXTRA_LDFLAGS=-static-libstdc++
-DD_COMPILER_FLAGS="-O -flto=full"
# FIXME: -defaultlib=phobos2-ldc-lto,druntime-ldc-lto
with_pgo: false

- job_name: macOS x86_64
os: macos-13
arch: x86_64
Expand Down Expand Up @@ -110,16 +125,27 @@ jobs:
steps:
- name: 'Container: Install git and sudo'
if: matrix.container_image
shell: bash
run: |
set -eux
apt-get -q update
DEBIAN_FRONTEND=noninteractive apt-get -yq install git-core sudo
if type -P apt-get &>/dev/null; then
apt-get -q update
DEBIAN_FRONTEND=noninteractive apt-get -yq install git-core sudo
else # set up Alpine container
apk add \
git cmake ninja g++ ldc llvm-dev llvm-static compiler-rt \
libxml2-static zstd-static zlib-static \
bash grep diffutils make curl
# create ../llvm symlink to distro LLVM (no prebuilt LDC-LLVM for musl)
ln -s /usr/lib/llvm17 $(dirname $(pwd))/llvm
../llvm/bin/llvm-config --version
fi
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 50
- name: Install prerequisites
if: |
!startsWith(matrix.container_image, 'alpine')
uses: ./.github/actions/1-setup
with:
llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }}
Expand Down

0 comments on commit d5bc515

Please sign in to comment.