added CI job for mingw

This commit is contained in:
emekoi 2020-04-11 19:58:48 -05:00 committed by Andrew Kelley
parent 8e9e126d41
commit 0744d93ed5
4 changed files with 32 additions and 3 deletions

View File

@ -28,12 +28,20 @@ jobs:
- job: BuildWindows
pool:
vmImage: 'windows-2019'
strategy:
matrix:
mingw64:
CHERE_INVOKING: yes
MSYSTEM: MINGW64
SCRIPT: '%CD:~0,2%\msys64\usr\bin\bash -lc "bash ci/azure/windows_mingw_script"'
msvc:
SCRIPT: ci/azure/windows_msvc_script.bat
timeoutInMinutes: 360
steps:
- script: |
git clone https://github.com/lazka/msys2-ci-base.git %CD:~0,2%\msys64
git clone https://github.com/msys2/msys2-ci-base.git %CD:~0,2%\msys64
%CD:~0,2%\msys64\usr\bin\rm -rf %CD:~0,2%\msys64\.git
set PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu
@ -41,7 +49,7 @@ jobs:
- task: DownloadSecureFile@1
inputs:
secureFile: s3cfg
- script: ci/azure/windows_script.bat
- script: $(SCRIPT)
name: main
displayName: 'Build and test'
- job: OnMasterSuccess

View File

@ -0,0 +1,21 @@
#!/bin/sh
set -x
set -e
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
git config core.abbrev 9
ZIGBUILDDIR="$(pwd)/build"
PREFIX="$ZIGBUILDDIR/dist"
CMAKEFLAGS="-DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX -DZIG_STATIC=ON"
mkdir $ZIGBUILDDIR
cd $ZIGBUILDDIR
cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKEFLAGS -DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=lld -Wl,/debug,/pdb:zig.pdb'
make -j$(nproc) install
./zig build test-behavior -Dskip-non-native -Dskip-release

View File

View File

@ -5,7 +5,7 @@ SET "PREVMSYSEM=%MSYSTEM%"
set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
SET "MSYSTEM=MINGW64"
bash -lc "cd ${SRCROOT} && ci/azure/windows_install" || exit /b
bash -lc "cd ${SRCROOT} && ci/azure/windows_msvc_install" || exit /b
SET "PATH=%PREVPATH%"
SET "MSYSTEM=%PREVMSYSTEM%"