diff --git a/ci/aarch64-windows.ps1 b/ci/aarch64-windows.ps1 index b0e7c474ca8c..2ac4936a92eb 100644 --- a/ci/aarch64-windows.ps1 +++ b/ci/aarch64-windows.ps1 @@ -30,6 +30,26 @@ if ((git rev-parse --is-shallow-repository) -eq "true") { git fetch --unshallow # `git describe` won't work on a shallow repo } +Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" +CheckLastExitCode + +Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" ` + -DevCmdArguments '-arch=arm64 -no_logo' ` + -StartInPath $(Get-Location) +CheckLastExitCode + +# Test building from source without LLVM. +git clean -fd +Remove-Item -Path 'zig-out' -Recurse -Force -ErrorAction Ignore +cl bootstrap.c /link /out:bootstrap.exe +CheckLastExitCode +./bootstrap.exe +CheckLastExitCode +./zig2.exe build -Dno-lib +CheckLastExitCode +./zig-out/bin/zig.exe test test/behavior.zig +CheckLastExitCode + Write-Output "Building from source..." Remove-Item -Path 'build-release' -Recurse -Force -ErrorAction Ignore New-Item -Path 'build-release' -ItemType Directory diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index 8fd4db222c52..c620926e4cdb 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -30,6 +30,26 @@ if ((git rev-parse --is-shallow-repository) -eq "true") { git fetch --unshallow # `git describe` won't work on a shallow repo } +Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" +CheckLastExitCode + +Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" ` + -DevCmdArguments '-arch=x64 -no_logo' ` + -StartInPath $(Get-Location) +CheckLastExitCode + +# Test building from source without LLVM. +git clean -fd +Remove-Item -Path 'zig-out' -Recurse -Force -ErrorAction Ignore +cl bootstrap.c /link /out:bootstrap.exe +CheckLastExitCode +./bootstrap.exe +CheckLastExitCode +./zig2.exe build -Dno-lib +CheckLastExitCode +./zig-out/bin/zig.exe test test/behavior.zig +CheckLastExitCode + Write-Output "Building from source..." Remove-Item -Path 'build-debug' -Recurse -Force -ErrorAction Ignore New-Item -Path 'build-debug' -ItemType Directory @@ -94,14 +114,6 @@ CheckLastExitCode -Mbuild_options="config.zig" CheckLastExitCode -Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" -CheckLastExitCode - -Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" ` - -DevCmdArguments '-arch=x64 -no_logo' ` - -StartInPath $(Get-Location) -CheckLastExitCode - Write-Output "Build and run behavior tests with msvc..." & cl.exe -I..\lib test-x86_64-windows-msvc.c compiler_rt-x86_64-windows-msvc.c /W3 /Z7 -link -nologo -debug -subsystem:console kernel32.lib ntdll.lib libcmt.lib CheckLastExitCode diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index 432d0649beb1..c7b0558f70ce 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -30,6 +30,26 @@ if ((git rev-parse --is-shallow-repository) -eq "true") { git fetch --unshallow # `git describe` won't work on a shallow repo } +Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" +CheckLastExitCode + +Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" ` + -DevCmdArguments '-arch=x64 -no_logo' ` + -StartInPath $(Get-Location) +CheckLastExitCode + +# Test building from source without LLVM. +git clean -fd +Remove-Item -Path 'zig-out' -Recurse -Force -ErrorAction Ignore +cl bootstrap.c /link /out:bootstrap.exe +CheckLastExitCode +./bootstrap.exe +CheckLastExitCode +./zig2.exe build -Dno-lib +CheckLastExitCode +./zig-out/bin/zig.exe test test/behavior.zig +CheckLastExitCode + Write-Output "Building from source..." Remove-Item -Path 'build-release' -Recurse -Force -ErrorAction Ignore New-Item -Path 'build-release' -ItemType Directory @@ -112,14 +132,6 @@ CheckLastExitCode -Mbuild_options="config.zig" CheckLastExitCode -Import-Module "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" -CheckLastExitCode - -Enter-VsDevShell -VsInstallPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" ` - -DevCmdArguments '-arch=x64 -no_logo' ` - -StartInPath $(Get-Location) -CheckLastExitCode - Write-Output "Build and run behavior tests with msvc..." & cl.exe -I..\lib test-x86_64-windows-msvc.c compiler_rt-x86_64-windows-msvc.c /W3 /Z7 -link -nologo -debug -subsystem:console kernel32.lib ntdll.lib libcmt.lib CheckLastExitCode