diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0f202de9e..15f6c81d14 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,6 +53,20 @@ 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 -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -link-defaultlib-shared=false" + with_pgo: false + - job_name: macOS x86_64 os: macos-13 arch: x86_64 @@ -110,16 +124,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 }}