| ... | ... | @@ -1,11 +1,37 @@ |
| 1 | 1 | @echo on |
| 2 | | echo %APPVEYOR_BUILD_FOLDER% |
| 2 | cd %APPVEYOR_BUILD_FOLDER% |
| 3 | SET "PREVPATH=%PATH%" |
| 4 | SET "PREVMSYSEM=%MSYSTEM%" |
| 5 | |
| 6 | SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%" |
| 7 | SET "MSYSTEM=MINGW64" |
| 8 | SET "APPVEYOR_CACHE_ENTRY_ZIP_ARGS=-m0=Copy" |
| 9 | |
| 10 | bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && if [ -s ""llvm+clang-5.0.0-win64-msvc-release.tar.xz"" ]; then echo 'skipping LLVM download'; else wget 'https://s3.amazonaws.com/superjoe/temp/llvm%%2bclang-5.0.0-win64-msvc-release.tar.xz'; fi && tar xf llvm+clang-5.0.0-win64-msvc-release.tar.xz" || exit /b |
| 11 | |
| 12 | |
| 13 | SET "PATH=%PREVPATH%" |
| 14 | SET "MSYSTEM=%PREVMSYSTEM%" |
| 15 | SET "ZIGBUILDDIR=%APPVEYOR_BUILD_FOLDER%\build-msvc-release" |
| 16 | SET "ZIGPREFIXPATH=%APPVEYOR_BUILD_FOLDER%\llvm+clang-5.0.0-win64-msvc-release" |
| 17 | |
| 18 | mkdir %ZIGBUILDDIR% |
| 19 | cd %ZIGBUILDDIR% |
| 20 | cmake.exe .. -Thost=x64 -G"Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=%ZIGBUILDDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release "-DZIG_LIBC_INCLUDE_DIR=C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt" "-DZIG_LIBC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" "-DZIG_LIBC_STATIC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" || exit /b |
| 21 | msbuild /p:Configuration=Release INSTALL.vcxproj || exit /b |
| 22 | |
| 23 | bin\zig.exe build --build-file ..\build.zig test || exit /b |
| 24 | |
| 25 | @echo "MSVC build succeeded, proceeding with MinGW build" |
| 3 | 26 | cd %APPVEYOR_BUILD_FOLDER% |
| 4 | 27 | SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%" |
| 5 | 28 | SET "MSYSTEM=MINGW64" |
| 6 | 29 | |
| 7 | 30 | bash -lc "pacman -Syu --needed --noconfirm" |
| 8 | 31 | bash -lc "pacman -Su --needed --noconfirm" |
| 32 | |
| 9 | 33 | bash -lc "pacman -S --needed --noconfirm make mingw64/mingw-w64-x86_64-make mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-clang mingw64/mingw-w64-x86_64-llvm mingw64/mingw-w64-x86_64-lld mingw64/mingw-w64-x86_64-gcc" |
| 10 | 34 | |
| 11 | 35 | bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && mkdir build && cd build && cmake .. -G""MSYS Makefiles"" -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | cc -E -x c - -v 2>&1 | grep -B1 ""End of search list."" | head -n1 | cut -c 2- | sed ""s/ .*//"") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-name=crtbegin.o)) && make && make install" |
| 36 | |
| 37 | @echo "MinGW build successful" |