Skip to content

Commit

Permalink
Azure CI: Add x86 (COFF) job based on windows.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke authored and thewilsonator committed Dec 17, 2023
1 parent 3525fb8 commit 4ad93e0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/windows-artifact.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- task: PublishPipelineArtifact@0
inputs:
artifactName: windows-$(ARCH)
artifactName: windows-$(MODEL)
targetPath: artifacts
displayName: Publish artifacts
3 changes: 1 addition & 2 deletions .azure-pipelines/windows-msbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 5 additions & 1 deletion .azure-pipelines/windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ad93e0

Please sign in to comment.