Skip to content

WIP: Try to fix DFuncValue #215

WIP: Try to fix DFuncValue

WIP: Try to fix DFuncValue #215

Workflow file for this run

name: Alpine Linux, musl libc, vanilla LLVM
on:
- pull_request
- push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Alpine Linux (musl libc)
runs-on: ubuntu-latest
container: alpine:3.20
steps:
- name: Install prerequisites
run: apk add ldc git g++ cmake ninja llvm-dev llvm-static compiler-rt libxml2-static zstd-static zlib-static bash grep diffutils make
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 50
- name: Build LDC bootstrap
run: |
ninja --version
set -eux
mkdir bootstrap
cd bootstrap
cmake -G Ninja .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/opt/ldc2" \
-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ \
-DD_COMPILER_FLAGS=-link-defaultlib-shared=false \
-DBUILD_SHARED_LIBS=OFF
ninja obj/ldc2.o all
bin/ldc2 --version
cd ..
# TODO: Add '-DLLVM_IS_SHARED=OFF' when static linking is fully supported
# TSan and XRay do not work.
- name: Build LDC & LDC D unittests & defaultlib unittest runners
run: |
set -eux
cmake -G Ninja . \
-DD_COMPILER=./bootstrap/bin/ldmd2 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/opt/ldc2" \
-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ \
-DD_COMPILER_FLAGS=-link-defaultlib-shared=false \
-DBUILD_SHARED_LIBS=OFF \
-DTEST_COMPILER_RT_LIBRARIES="profile;lsan;asan;msan;fuzzer"
ninja obj/ldc2.o all ldc2-unittest all-test-runners
bin/ldc2 --version
ldd bin/ldc2
- name: Run LDC D unittests
if: success() || failure()
run: ctest --output-on-failure -R "ldc2-unittest"
- name: Run LIT testsuite
if: success() || failure()
run: |
set -eux
ctest -V -R "lit-tests"
- name: Run DMD testsuite
if: success() || failure()
run: |
# These two tests require extra flags "-link-defaultlib-debug -frame-pointer=all", https://github.com/ldc-developers/ldc/issues/4694.
# Run them separately with these flags, and then remove them before running the full testsuite.
bin/ldc2 -g -L-export-dynamic -link-defaultlib-debug -frame-pointer=all -run tests/dmd/runnable/test17559.d
bin/ldc2 -O -g -L-export-dynamic -link-defaultlib-debug -frame-pointer=all -run tests/dmd/runnable/test17559.d
bin/ldc2 -g -L-export-dynamic -link-defaultlib-debug -frame-pointer=all -run tests/dmd/runnable/test19086.d
bin/ldc2 -O -g -L-export-dynamic -link-defaultlib-debug -frame-pointer=all -run tests/dmd/runnable/test19086.d
rm tests/dmd/runnable/test17559.d
rm tests/dmd/runnable/test19086.d
ctest -V -R "dmd-testsuite"
- name: Run defaultlib unittests & druntime integration tests
if: success() || failure()
run: |
set -eux
ctest -j$(nproc) --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest"