| author | |
| committer | |
| log | c795e82cbccaa4c68272c7891841526c00f0db90 |
| tree | c20b046db94ab60db8367f50d11c010a1b2a095b |
| parent | c49fe52cb1778d6398a588889711848817ce64ec |
6 files changed, 100 insertions(+), 97 deletions(-)
ci/azure/pipelines.yml+1-1| ... | @@ -60,7 +60,7 @@ jobs: | ... | @@ -60,7 +60,7 @@ jobs: |
| 60 | - task: DownloadSecureFile@1 | 60 | - task: DownloadSecureFile@1 |
| 61 | inputs: | 61 | inputs: |
| 62 | secureFile: s3cfg | 62 | secureFile: s3cfg |
| 63 | - script: ci/azure/windows_script.bat | 63 | - script: ci/azure/windows_msvc_script.bat |
| 64 | name: main | 64 | name: main |
| 65 | displayName: 'Build and test' | 65 | displayName: 'Build and test' |
| 66 | - job: OnMasterSuccess | 66 | - job: OnMasterSuccess |
ci/azure/windows_msvc_install created+11| ... | @@ -0,0 +1,11 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | pacman -Suy --needed --noconfirm | ||
| 7 | pacman -S --needed --noconfirm wget p7zip python3-pip tar xz | ||
| 8 | |||
| 9 | pip install s3cmd | ||
| 10 | wget -nv "https://ziglang.org/deps/llvm%2bclang%2blld-12.0.0-x86_64-windows-msvc-release-mt.tar.xz" | ||
| 11 | tar xf llvm+clang+lld-12.0.0-x86_64-windows-msvc-release-mt.tar.xz | ||
ci/azure/windows_msvc_script.bat created+47| ... | @@ -0,0 +1,47 @@ | ||
| 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-12.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 | git.exe fetch --unshallow | ||
| 22 | git.exe fetch --tags | ||
| 23 | |||
| 24 | mkdir %ZIGBUILDDIR% | ||
| 25 | cd %ZIGBUILDDIR% | ||
| 26 | cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release -DZIG_OMIT_STAGE2=ON || exit /b | ||
| 27 | msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b | ||
| 28 | |||
| 29 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-behavior -Dskip-non-native || exit /b | ||
| 30 | REM Disabled to prevent OOM | ||
| 31 | REM "%ZIGINSTALLDIR%\bin\zig.exe" build test-stage2 -Dskip-non-native || exit /b | ||
| 32 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-fmt -Dskip-non-native || exit /b | ||
| 33 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-std -Dskip-non-native || exit /b | ||
| 34 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-compiler-rt -Dskip-non-native || exit /b | ||
| 35 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-compare-output -Dskip-non-native || exit /b | ||
| 36 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-standalone -Dskip-non-native || exit /b | ||
| 37 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-stack-traces -Dskip-non-native || exit /b | ||
| 38 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-cli -Dskip-non-native || exit /b | ||
| 39 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-asm-link -Dskip-non-native || exit /b | ||
| 40 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-runtime-safety -Dskip-non-native || exit /b | ||
| 41 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-translate-c -Dskip-non-native || exit /b | ||
| 42 | "%ZIGINSTALLDIR%\bin\zig.exe" build test-run-translated-c -Dskip-non-native || exit /b | ||
| 43 | "%ZIGINSTALLDIR%\bin\zig.exe" build docs || exit /b | ||
| 44 | |||
| 45 | set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" | ||
| 46 | SET "MSYSTEM=MINGW64" | ||
| 47 | bash -lc "cd ${SRCROOT} && ci/azure/windows_upload" || exit /b | ||
ci/azure/windows_script deleted-88| ... | @@ -1,88 +0,0 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | pacman -Suy --needed --noconfirm | ||
| 7 | pacman -S --needed --noconfirm cmake git ninja wget p7zip python3-pip tar xz | ||
| 8 | |||
| 9 | pip install s3cmd | ||
| 10 | |||
| 11 | ZIGDIR="$(pwd)" | ||
| 12 | CACHE_BASENAME="zig+llvm+lld+clang-x86_64-windows-gnu-0.8.0-dev.1951+c59241bda" | ||
| 13 | PREFIX="$HOME/$CACHE_BASENAME" | ||
| 14 | ZIG="$PREFIX/bin/zig.exe" | ||
| 15 | |||
| 16 | cd "$HOME" | ||
| 17 | wget -nv "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz" | ||
| 18 | tar xf "$CACHE_BASENAME.tar.xz" | ||
| 19 | |||
| 20 | cd "$ZIGDIR" | ||
| 21 | |||
| 22 | # Make the `zig version` number consistent. | ||
| 23 | # This will affect the cmake command below. | ||
| 24 | git config core.abbrev 9 | ||
| 25 | git fetch --unshallow || true | ||
| 26 | git fetch --tags | ||
| 27 | |||
| 28 | mkdir build | ||
| 29 | cd build | ||
| 30 | "$ZIG" build -Dstage1 -Domit-stage2 -Drelease \ | ||
| 31 | -Dtarget=x86_64-windows-gnu \ | ||
| 32 | -Dcpu=x86_64_v2 \ | ||
| 33 | --search-prefix "$PREFIX" \ | ||
| 34 | --override-lib-dir "$ZIGDIR/lib" \ | ||
| 35 | --prefix "$(pwd)/dist" | ||
| 36 | |||
| 37 | dist/bin/zig.exe build test-behavior -Dskip-non-native | ||
| 38 | # Disabled to prevent OOM | ||
| 39 | # dist/bin/zig build test-stage2 | ||
| 40 | dist/bin/zig.exe build test-fmt -Dskip-non-native | ||
| 41 | dist/bin/zig.exe build test-std -Dskip-non-native | ||
| 42 | dist/bin/zig.exe build test-compiler-rt -Dskip-non-native | ||
| 43 | dist/bin/zig.exe build test-compare-output -Dskip-non-native | ||
| 44 | dist/bin/zig.exe build test-standalone -Dskip-non-native | ||
| 45 | dist/bin/zig.exe build test-stack-traces -Dskip-non-native | ||
| 46 | dist/bin/zig.exe build test-cli -Dskip-non-native | ||
| 47 | dist/bin/zig.exe build test-asm-link -Dskip-non-native | ||
| 48 | dist/bin/zig.exe build test-runtime-safety -Dskip-non-native | ||
| 49 | dist/bin/zig.exe build test-translate-c -Dskip-non-native | ||
| 50 | dist/bin/zig.exe build test-run-translated-c -Dskip-non-native | ||
| 51 | dist/bin/zig.exe build docs | ||
| 52 | |||
| 53 | if [ "${BUILD_REASON}" != "PullRequest" ]; then | ||
| 54 | cd "$ZIGDIR/build" | ||
| 55 | |||
| 56 | mv ../LICENSE dist/ | ||
| 57 | mv ../zig-cache/langref.html dist/ | ||
| 58 | mv dist/bin/zig.exe dist/ | ||
| 59 | rmdir dist/bin | ||
| 60 | |||
| 61 | VERSION=$(dist/zig.exe version) | ||
| 62 | DIRNAME="zig-windows-x86_64-$VERSION" | ||
| 63 | TARBALL="$DIRNAME.zip" | ||
| 64 | mv dist "$DIRNAME" | ||
| 65 | 7z a "$TARBALL" "$DIRNAME" | ||
| 66 | |||
| 67 | # mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg" | ||
| 68 | s3cmd -c "$DOWNLOADSECUREFILE_SECUREFILEPATH" put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/ | ||
| 69 | |||
| 70 | SHASUM=$(sha256sum $TARBALL | cut '-d ' -f1) | ||
| 71 | BYTESIZE=$(wc -c < $TARBALL) | ||
| 72 | |||
| 73 | JSONFILE="windows-$GITBRANCH.json" | ||
| 74 | touch $JSONFILE | ||
| 75 | echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE | ||
| 76 | echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE | ||
| 77 | echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE | ||
| 78 | |||
| 79 | s3cmd -c "$DOWNLOADSECUREFILE_SECUREFILEPATH" put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" | ||
| 80 | s3cmd -c "$DOWNLOADSECUREFILE_SECUREFILEPATH" put -P "$JSONFILE" "s3://ziglang.org/builds/x86_64-windows-$VERSION.json" | ||
| 81 | |||
| 82 | # `set -x` causes these variables to be mangled. | ||
| 83 | # See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html | ||
| 84 | set +x | ||
| 85 | echo "##vso[task.setvariable variable=tarball;isOutput=true]$TARBALL" | ||
| 86 | echo "##vso[task.setvariable variable=shasum;isOutput=true]$SHASUM" | ||
| 87 | echo "##vso[task.setvariable variable=bytesize;isOutput=true]$BYTESIZE" | ||
| 88 | fi | ||
ci/azure/windows_script.bat deleted-8| ... | @@ -1,8 +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_script" || exit /b | ||
ci/azure/windows_upload created+41| ... | @@ -0,0 +1,41 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -x | ||
| 4 | set -e | ||
| 5 | |||
| 6 | if [ "${BUILD_REASON}" != "PullRequest" ]; then | ||
| 7 | cd "$ZIGBUILDDIR" | ||
| 8 | |||
| 9 | mv ../LICENSE dist/ | ||
| 10 | mv ../zig-cache/langref.html dist/ | ||
| 11 | mv dist/bin/zig.exe dist/ | ||
| 12 | rmdir dist/bin | ||
| 13 | |||
| 14 | VERSION=$(dist/zig.exe version) | ||
| 15 | DIRNAME="zig-windows-x86_64-$VERSION" | ||
| 16 | TARBALL="$DIRNAME.zip" | ||
| 17 | mv dist "$DIRNAME" | ||
| 18 | 7z a "$TARBALL" "$DIRNAME" | ||
| 19 | |||
| 20 | # mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg" | ||
| 21 | s3cmd -c "$DOWNLOADSECUREFILE_SECUREFILEPATH" put -P --add-header="cache-control: public, max-age=31536000, immutable" "$TARBALL" s3://ziglang.org/builds/ | ||
| 22 | |||
| 23 | SHASUM=$(sha256sum $TARBALL | cut '-d ' -f1) | ||
| 24 | BYTESIZE=$(wc -c < $TARBALL) | ||
| 25 | |||
| 26 | JSONFILE="windows-$GITBRANCH.json" | ||
| 27 | touch $JSONFILE | ||
| 28 | echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE | ||
| 29 | echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE | ||
| 30 | echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE | ||
| 31 | |||
| 32 | s3cmd -c "$DOWNLOADSECUREFILE_SECUREFILEPATH" put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" | ||
| 33 | s3cmd -c "$DOWNLOADSECUREFILE_SECUREFILEPATH" put -P "$JSONFILE" "s3://ziglang.org/builds/x86_64-windows-$VERSION.json" | ||
| 34 | |||
| 35 | # `set -x` causes these variables to be mangled. | ||
| 36 | # See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html | ||
| 37 | set +x | ||
| 38 | echo "##vso[task.setvariable variable=tarball;isOutput=true]$TARBALL" | ||
| 39 | echo "##vso[task.setvariable variable=shasum;isOutput=true]$SHASUM" | ||
| 40 | echo "##vso[task.setvariable variable=bytesize;isOutput=true]$BYTESIZE" | ||
| 41 | fi | ||