From 4ad93e00ea21cb33aef5c452d708648c81458e7c Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Sun, 10 Dec 2023 22:11:31 +0100 Subject: [PATCH] Azure CI: Add x86 (COFF) job based on windows.sh --- .azure-pipelines/windows-artifact.yml | 2 +- .azure-pipelines/windows-msbuild.bat | 3 +-- .azure-pipelines/windows.sh | 6 +++++- azure-pipelines.yml | 3 +++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/windows-artifact.yml b/.azure-pipelines/windows-artifact.yml index a742b9afd9..23003a4c32 100644 --- a/.azure-pipelines/windows-artifact.yml +++ b/.azure-pipelines/windows-artifact.yml @@ -1,6 +1,6 @@ steps: - task: PublishPipelineArtifact@0 inputs: - artifactName: windows-$(ARCH) + artifactName: windows-$(MODEL) targetPath: artifacts displayName: Publish artifacts diff --git a/.azure-pipelines/windows-msbuild.bat b/.azure-pipelines/windows-msbuild.bat index c69bdafb76..25a52ad4a9 100644 --- a/.azure-pipelines/windows-msbuild.bat +++ b/.azure-pipelines/windows-msbuild.bat @@ -95,8 +95,7 @@ make -j%N% MODEL=%MODEL% "DMD=%DMD%" "CC=%MSVC_CC%" unittest || exit /B 5 echo [STEP]: Running DMD testsuite cd "%DMD_DIR%\compiler\test" -set CC=%MSVC_CC% -run.exe --environment --jobs=%N% %DMD_TESTS% "ARGS=-O -inline -g" "BUILD=%CONFIGURATION%" "DMD_MODEL=%PLATFORM%" || exit /B 6 +run.exe --environment --jobs=%N% %DMD_TESTS% "ARGS=-O -inline -g" "BUILD=%CONFIGURATION%" "DMD_MODEL=%PLATFORM%" "CC=%MSVC_CC%" || exit /B 6 echo [STEP]: Building and running Phobos unittests rem FIXME: lld-link fails to link phobos unittests ("error: relocation against symbol in discarded section: __TMP2427") diff --git a/.azure-pipelines/windows.sh b/.azure-pipelines/windows.sh index 2a19e23e33..f06a8693cd 100644 --- a/.azure-pipelines/windows.sh +++ b/.azure-pipelines/windows.sh @@ -104,6 +104,10 @@ LIBS_MAKE_ARGS=(-f "$MAKE_FILE" MODEL=$MODEL DMD="$DMD_BIN_PATH" VCDIR=. CC="$CC cd "$DMD_DIR/../phobos" "$DM_MAKE" "${LIBS_MAKE_ARGS[@]}" DRUNTIME="$DMD_DIR\druntime" DRUNTIMELIB="$DMD_DIR/generated/windows/release/$MODEL/druntime.lib" +if [[ "$MODEL" == "32" ]]; then + # the expected Phobos filename for 32-bit COFF is phobos32mscoff.lib, not phobos32.lib + mv phobos32.lib phobos32mscoff.lib +fi ################################################################################ # Run DMD testsuite @@ -148,7 +152,7 @@ if [ "$HOST_DMD_VERSION" = "2.079.0" ] ; then targets=("runnable" "compilable" "fail_compilation" "dshell") args=() # use default set of args fi -CC="$CC" ./run --environment --jobs=$N "${targets[@]}" "${args[@]}" +./run --environment --jobs=$N "${targets[@]}" "${args[@]}" CC="$CC" ############################################################################### # Upload coverage reports and exit if ENABLE_COVERAGE is specified diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 272fe66e03..7eeaf4f559 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,6 +33,9 @@ jobs: x86-OMF: MODEL: 32omf ARCH: x86 + x86: + MODEL: 32 + ARCH: x86 steps: - template: .azure-pipelines/windows.yml - template: .azure-pipelines/windows-artifact.yml