aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authoremekoi <emekankurumeh@outlook.com>2020-04-11 19:58:48 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-04-12 16:44:29 -0400
commit0744d93ed550dfb85af1d8cbe3b18e5e5d02b290 (patch)
treeae0b555ef95dda9c1ad6cd0ab02089e396e91daa /ci
parent8e9e126d41cbca619a2a4658fb38d10120388e8f (diff)
downloadzig-0744d93ed550dfb85af1d8cbe3b18e5e5d02b290.tar.gz
zig-0744d93ed550dfb85af1d8cbe3b18e5e5d02b290.zip
added CI job for mingw
Diffstat (limited to 'ci')
-rw-r--r--ci/azure/pipelines.yml12
-rw-r--r--ci/azure/windows_mingw_script21
-rw-r--r--[-rwxr-xr-x]ci/azure/windows_msvc_install (renamed from ci/azure/windows_install)0
-rw-r--r--ci/azure/windows_msvc_script.bat (renamed from ci/azure/windows_script.bat)2
4 files changed, 32 insertions, 3 deletions
diff --git a/ci/azure/pipelines.yml b/ci/azure/pipelines.yml
index 5dbfe5a338..fdf9d92d7d 100644
--- a/ci/azure/pipelines.yml
+++ b/ci/azure/pipelines.yml
@@ -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
diff --git a/ci/azure/windows_mingw_script b/ci/azure/windows_mingw_script
new file mode 100644
index 0000000000..7883766427
--- /dev/null
+++ b/ci/azure/windows_mingw_script
@@ -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
diff --git a/ci/azure/windows_install b/ci/azure/windows_msvc_install
index ece3bbde11..ece3bbde11 100755..100644
--- a/ci/azure/windows_install
+++ b/ci/azure/windows_msvc_install
diff --git a/ci/azure/windows_script.bat b/ci/azure/windows_msvc_script.bat
index a8ae902de4..b2063a8e5f 100644
--- a/ci/azure/windows_script.bat
+++ b/ci/azure/windows_msvc_script.bat
@@ -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%"