Skip to content

Commit 0e65904

Browse files
kcbannerandrewrk
authored andcommitted
ci: run the behaviour tests using the cbe and msvc
1 parent 7cb2f92 commit 0e65904

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

ci/x86_64-windows.ps1

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,37 @@ Write-Output "Testing Autodocs..."
6767
-fno-emit-bin
6868
CheckLastExitCode
6969

70+
Write-Output "Build behaviour tests using the C backend..."
71+
& "stage3-release\bin\zig.exe" test `
72+
..\test\behavior.zig `
73+
--zig-lib-dir "$ZIG_LIB_DIR" `
74+
-I..\test `
75+
-I..\lib `
76+
-ofmt=c `
77+
-femit-bin="test_behaviour.c"
78+
CheckLastExitCode
79+
80+
& "stage3-release\bin\zig.exe" build-obj `
81+
..\lib\compiler_rt.zig `
82+
--zig-lib-dir "$ZIG_LIB_DIR" `
83+
-ofmt=c `
84+
-OReleaseSmall `
85+
--name compiler_rt `
86+
-femit-bin="compiler_rt.c" `
87+
--pkg-begin build_options config.zig --pkg-end
88+
CheckLastExitCode
89+
90+
Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
91+
CheckLastExitCode
92+
93+
Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" `
94+
-DevCmdArguments '-arch=x64 -no_logo' `
95+
-StartInPath $(Get-Location)
96+
CheckLastExitCode
97+
98+
Write-Output "Build and run behaviour tests with msvc..."
99+
& cl.exe -I..\lib test_behaviour.c compiler_rt.c /W3 /Z7 -link -nologo -debug -subsystem:console -entry:wWinMainCRTStartup kernel32.lib ntdll.lib vcruntime.lib libucrt.lib
100+
CheckLastExitCode
101+
102+
& .\test_behaviour.exe
103+
CheckLastExitCode

0 commit comments

Comments
 (0)