From 4fd1a8d1e8c36336d6d10c6766c3a7e7782bd920 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 15:14:55 +0300 Subject: [PATCH 1/7] CI: show logs Signed-off-by: Andrei Horodniceanu --- .github/actions/4d-test-libs/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/4d-test-libs/action.yml b/.github/actions/4d-test-libs/action.yml index 01844f595b6..6be2772cc70 100644 --- a/.github/actions/4d-test-libs/action.yml +++ b/.github/actions/4d-test-libs/action.yml @@ -35,7 +35,7 @@ runs: excludes+='|^std.experimental.allocator.building_blocks.allocator_list' fi - ctest -j$N --output-on-failure -E "$excludes" --timeout 120 + ctest -j1 -V --output-on-failure -E "$excludes" --timeout 120 - name: 'Windows: Run defaultlib unittests & druntime integration tests' if: runner.os == 'Windows' @@ -51,4 +51,4 @@ runs: call "%LDC_VSDIR%\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} || exit /b echo on cd build || exit /b - ctest -j4 --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest" --timeout 120 || exit /b + ctest -j1 -V --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest" --timeout 120 || exit /b From cbd8aca2f3425a032397362a2ec15988f82eb45e Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 17:57:13 +0300 Subject: [PATCH 2/7] CI: check for apk tool Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 758ccbaffed..c9ab55cd03b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -190,6 +190,13 @@ jobs: uses: ./.github/actions/4c-test-dmd with: arch: ${{ matrix.arch }} + + - name: Check apk tool + shell: bash + run: | + command -v apk || true + apk --version || true + - name: Run defaultlib unittests & druntime integration tests if: success() || failure() uses: ./.github/actions/4d-test-libs From 5320621ed2b6f4759fcc52848d08703efeaddcd5 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 17:57:25 +0300 Subject: [PATCH 3/7] CI: check if MUSL is correctly detected Signed-off-by: Andrei Horodniceanu --- runtime/druntime/test/exceptions/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/druntime/test/exceptions/Makefile b/runtime/druntime/test/exceptions/Makefile index 7565e425060..dc875a93ee0 100644 --- a/runtime/druntime/test/exceptions/Makefile +++ b/runtime/druntime/test/exceptions/Makefile @@ -6,7 +6,10 @@ endif ifeq ($(OS),linux) # FIXME: detect musl libc robustly; just checking Alpine Linux' apk tool for now ifeq (1,$(shell which apk &>/dev/null && echo 1)) + $(warning ~~~ musl detected) IS_MUSL:=1 + else + $(warning ~~~ musl NOT detected) endif endif @@ -65,6 +68,8 @@ endif ifeq ($(OS),windows) TESTS+=winstack endif + +$(warning ~~~ All the tests are: $(TESTS)) include ../common.mak $(ROOT)/line_trace.done: $(ROOT)/line_trace$(DOTEXE) From 5e0857358256ac82a7a2a6c5bf7396bc35d92112 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 19:23:01 +0300 Subject: [PATCH 4/7] [druntime-test]: exceptions use portable command -v instead of which Signed-off-by: Andrei Horodniceanu --- runtime/druntime/test/exceptions/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/druntime/test/exceptions/Makefile b/runtime/druntime/test/exceptions/Makefile index dc875a93ee0..f3a24dabe86 100644 --- a/runtime/druntime/test/exceptions/Makefile +++ b/runtime/druntime/test/exceptions/Makefile @@ -5,7 +5,7 @@ endif ifeq ($(OS),linux) # FIXME: detect musl libc robustly; just checking Alpine Linux' apk tool for now - ifeq (1,$(shell which apk &>/dev/null && echo 1)) + ifeq (1,$(shell command -v apk &>/dev/null && echo 1)) $(warning ~~~ musl detected) IS_MUSL:=1 else From 21166150b6a38564fa3c7485d6d9f1c30c0fb222 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 19:32:24 +0300 Subject: [PATCH 5/7] [druntime-test]: exceptions: print which commands Signed-off-by: Andrei Horodniceanu --- runtime/druntime/test/exceptions/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/druntime/test/exceptions/Makefile b/runtime/druntime/test/exceptions/Makefile index f3a24dabe86..a656bc929fa 100644 --- a/runtime/druntime/test/exceptions/Makefile +++ b/runtime/druntime/test/exceptions/Makefile @@ -3,6 +3,11 @@ ifdef IN_LDC include ../../../../dmd/osmodel.mak endif +$(info $(shell which apk ; echo $$?)) +$(info $(shell which apk && echo 1 ; echo $$?)) +$(info $(shell command -v apk ; echo $$?)) +$(info $(shell command -v apk && echo 1 ; echo $$?)) + ifeq ($(OS),linux) # FIXME: detect musl libc robustly; just checking Alpine Linux' apk tool for now ifeq (1,$(shell command -v apk &>/dev/null && echo 1)) From 6171ff18cce96b97d10445300715e268f00f1073 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 20:12:46 +0300 Subject: [PATCH 6/7] [druntime-test]: exceptions: try != instead of $(shell) Signed-off-by: Andrei Horodniceanu --- runtime/druntime/test/exceptions/Makefile | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/runtime/druntime/test/exceptions/Makefile b/runtime/druntime/test/exceptions/Makefile index a656bc929fa..05237caccad 100644 --- a/runtime/druntime/test/exceptions/Makefile +++ b/runtime/druntime/test/exceptions/Makefile @@ -3,19 +3,16 @@ ifdef IN_LDC include ../../../../dmd/osmodel.mak endif -$(info $(shell which apk ; echo $$?)) -$(info $(shell which apk && echo 1 ; echo $$?)) -$(info $(shell command -v apk ; echo $$?)) -$(info $(shell command -v apk && echo 1 ; echo $$?)) +$(info $(shell which apk &>/dev/null; echo $$?)) +$(info $(shell which apk &>/dev/null && echo 1 ; echo $$?)) +$(info $(shell command -v apk &>/dev/null ; echo $$?)) +$(info $(shell command -v apk &>/dev/null && echo 1 ; echo $$?)) + ifeq ($(OS),linux) # FIXME: detect musl libc robustly; just checking Alpine Linux' apk tool for now - ifeq (1,$(shell command -v apk &>/dev/null && echo 1)) - $(warning ~~~ musl detected) - IS_MUSL:=1 - else - $(warning ~~~ musl NOT detected) - endif + IS_MUSL != command -v apk &>/dev/null && echo 1 + $(warning ~~~ musl $(IS_MUSL)) endif TESTS=stderr_msg unittest_assert invalid_memory_operation static_dtor \ From 8150b122855f75a1082aab8c4d8f93c4d466bfa3 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 18 Aug 2025 21:15:11 +0300 Subject: [PATCH 7/7] CI: check if /bin/sh is dash Signed-off-by: Andrei Horodniceanu --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9ab55cd03b..687d3cc899e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -147,6 +147,13 @@ jobs: with: submodules: true fetch-depth: 50 + + - name: Check dash + shell: bash + run: | + /bin/sh --version || true + dpkg -s dash || true + - name: Install prerequisites if: | !startsWith(matrix.container_image, 'alpine')