| author | |
| committer | |
| log | 0744d93ed550dfb85af1d8cbe3b18e5e5d02b290 |
| tree | ae0b555ef95dda9c1ad6cd0ab02089e396e91daa |
| parent | 8e9e126d41cbca619a2a4658fb38d10120388e8f |
6 files changed, 72 insertions(+), 43 deletions(-)
ci/azure/pipelines.yml+10-2| ... | @@ -28,12 +28,20 @@ jobs: | ... | @@ -28,12 +28,20 @@ jobs: |
| 28 | - job: BuildWindows | 28 | - job: BuildWindows |
| 29 | pool: | 29 | pool: |
| 30 | vmImage: 'windows-2019' | 30 | vmImage: 'windows-2019' |
| 31 | strategy: | ||
| 32 | matrix: | ||
| 33 | mingw64: | ||
| 34 | CHERE_INVOKING: yes | ||
| 35 | MSYSTEM: MINGW64 | ||
| 36 | SCRIPT: '%CD:~0,2%\msys64\usr\bin\bash -lc "bash ci/azure/windows_mingw_script"' | ||
| 37 | msvc: | ||
| 38 | SCRIPT: ci/azure/windows_msvc_script.bat | ||
| 31 | 39 | ||
| 32 | timeoutInMinutes: 360 | 40 | timeoutInMinutes: 360 |
| 33 | 41 | ||
| 34 | steps: | 42 | steps: |
| 35 | - script: | | 43 | - script: | |
| 36 | git clone https://github.com/lazka/msys2-ci-base.git %CD:~0,2%\msys64 | 44 | git clone https://github.com/msys2/msys2-ci-base.git %CD:~0,2%\msys64 |
| 37 | %CD:~0,2%\msys64\usr\bin\rm -rf %CD:~0,2%\msys64\.git | 45 | %CD:~0,2%\msys64\usr\bin\rm -rf %CD:~0,2%\msys64\.git |
| 38 | set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem | 46 | set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem |
| 39 | %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu | 47 | %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu |
| ... | @@ -41,7 +49,7 @@ jobs: | ... | @@ -41,7 +49,7 @@ jobs: |
| 41 | - task: DownloadSecureFile@1 | 49 | - task: DownloadSecureFile@1 |
| 42 | inputs: | 50 | inputs: |
| 43 | secureFile: s3cfg | 51 | secureFile: s3cfg |
| 44 | - script: ci/azure/windows_script.bat | 52 | - script: $(SCRIPT) |
| 45 | name: main | 53 | name: main |
| 46 | displayName: 'Build and test' | 54 | displayName: 'Build and test' |
| 47 | - job: OnMasterSuccess | 55 | - job: OnMasterSuccess |
ci/azure/windows_install deleted-10| ... | @@ -1,10 +0,0 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | pacman -Su --needed --noconfirm | ||
| 7 | pacman -S --needed --noconfirm wget p7zip python3-pip | ||
| 8 | pip install s3cmd | ||
| 9 | wget -nv "https://ziglang.org/deps/llvm%2bclang%2blld-10.0.0-x86_64-windows-msvc-release-mt.tar.xz" | ||
| 10 | tar xf llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt.tar.xz | ||
ci/azure/windows_mingw_script created+21| ... | @@ -0,0 +1,21 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | pacman --noconfirm --needed -S git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-llvm | ||
| 7 | |||
| 8 | git config core.abbrev 9 | ||
| 9 | |||
| 10 | ZIGBUILDDIR="$(pwd)/build" | ||
| 11 | PREFIX="$ZIGBUILDDIR/dist" | ||
| 12 | CMAKEFLAGS="-DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX -DZIG_STATIC=ON" | ||
| 13 | |||
| 14 | mkdir $ZIGBUILDDIR | ||
| 15 | cd $ZIGBUILDDIR | ||
| 16 | |||
| 17 | cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKEFLAGS -DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=lld -Wl,/debug,/pdb:zig.pdb' | ||
| 18 | |||
| 19 | make -j$(nproc) install | ||
| 20 | |||
| 21 | ./zig build test-behavior -Dskip-non-native -Dskip-release | ||
ci/azure/windows_msvc_install created+10| ... | @@ -0,0 +1,10 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | pacman -Su --needed --noconfirm | ||
| 7 | pacman -S --needed --noconfirm wget p7zip python3-pip | ||
| 8 | pip install s3cmd | ||
| 9 | wget -nv "https://ziglang.org/deps/llvm%2bclang%2blld-10.0.0-x86_64-windows-msvc-release-mt.tar.xz" | ||
| 10 | tar xf llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt.tar.xz | ||
ci/azure/windows_msvc_script.bat created+31| ... | @@ -0,0 +1,31 @@ | ||
| 1 | @echo on | ||
| 2 | SET "SRCROOT=%cd%" | ||
| 3 | SET "PREVPATH=%PATH%" | ||
| 4 | SET "PREVMSYSEM=%MSYSTEM%" | ||
| 5 | |||
| 6 | set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" | ||
| 7 | SET "MSYSTEM=MINGW64" | ||
| 8 | bash -lc "cd ${SRCROOT} && ci/azure/windows_msvc_install" || exit /b | ||
| 9 | SET "PATH=%PREVPATH%" | ||
| 10 | SET "MSYSTEM=%PREVMSYSTEM%" | ||
| 11 | |||
| 12 | SET "ZIGBUILDDIR=%SRCROOT%\build" | ||
| 13 | SET "ZIGINSTALLDIR=%ZIGBUILDDIR%\dist" | ||
| 14 | SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt" | ||
| 15 | |||
| 16 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | ||
| 17 | |||
| 18 | REM Make the `zig version` number consistent. | ||
| 19 | REM This will affect the cmake command below. | ||
| 20 | git.exe config core.abbrev 9 | ||
| 21 | |||
| 22 | mkdir %ZIGBUILDDIR% | ||
| 23 | cd %ZIGBUILDDIR% | ||
| 24 | cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b | ||
| 25 | msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b | ||
| 26 | |||
| 27 | "%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b | ||
| 28 | |||
| 29 | set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" | ||
| 30 | SET "MSYSTEM=MINGW64" | ||
| 31 | bash -lc "cd ${SRCROOT} && ci/azure/windows_upload" || exit /b | ||
ci/azure/windows_script.bat deleted-31| ... | @@ -1,31 +0,0 @@ | ||
| 1 | @echo on | ||
| 2 | SET "SRCROOT=%cd%" | ||
| 3 | SET "PREVPATH=%PATH%" | ||
| 4 | SET "PREVMSYSEM=%MSYSTEM%" | ||
| 5 | |||
| 6 | set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" | ||
| 7 | SET "MSYSTEM=MINGW64" | ||
| 8 | bash -lc "cd ${SRCROOT} && ci/azure/windows_install" || exit /b | ||
| 9 | SET "PATH=%PREVPATH%" | ||
| 10 | SET "MSYSTEM=%PREVMSYSTEM%" | ||
| 11 | |||
| 12 | SET "ZIGBUILDDIR=%SRCROOT%\build" | ||
| 13 | SET "ZIGINSTALLDIR=%ZIGBUILDDIR%\dist" | ||
| 14 | SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt" | ||
| 15 | |||
| 16 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | ||
| 17 | |||
| 18 | REM Make the `zig version` number consistent. | ||
| 19 | REM This will affect the cmake command below. | ||
| 20 | git.exe config core.abbrev 9 | ||
| 21 | |||
| 22 | mkdir %ZIGBUILDDIR% | ||
| 23 | cd %ZIGBUILDDIR% | ||
| 24 | cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b | ||
| 25 | msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b | ||
| 26 | |||
| 27 | "%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b | ||
| 28 | |||
| 29 | set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" | ||
| 30 | SET "MSYSTEM=MINGW64" | ||
| 31 | bash -lc "cd ${SRCROOT} && ci/azure/windows_upload" || exit /b | ||