diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..88bf6e3c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,28 @@ +branches: + only: + - master + - appveyor + +environment: + matrix: + - MSYSTEM: MINGW64 + - MSYSTEM: MINGW32 + +shallow_clone: true +test: off + +install: + # Update core packages + - C:\msys64\usr\bin\pacman -Syyuu --noconfirm --noprogressbar + # Update non-core packages + - C:\msys64\usr\bin\pacman -Suu --noconfirm --noprogressbar + # Install required MSYS2 packages + - C:\msys64\usr\bin\pacman -S --noconfirm --noprogressbar --needed automake-wrapper make + # Now MSYS2 is up to date, do the rest of the install from a bash script + - C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./tools/appveyor-install.sh" + +build_script: + - C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./tools/appveyor-build.sh" + +cache: + - C:\msys64\var\cache\pacman\pkg diff --git a/tools/appveyor-build.sh b/tools/appveyor-build.sh new file mode 100644 index 00000000..39f547a9 --- /dev/null +++ b/tools/appveyor-build.sh @@ -0,0 +1,12 @@ +#!/usr/bin/bash +set -e + +export CC=gcc + +./autogen.sh +./configure \ + --host=$MINGW_CHOST \ + --build=$MINGW_CHOST \ + --target=$MINGW_CHOST \ + --disable-shared --enable-static +make diff --git a/tools/appveyor-install.sh b/tools/appveyor-install.sh new file mode 100644 index 00000000..7d39fed7 --- /dev/null +++ b/tools/appveyor-install.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash +set -e + +# Install build dependencies for kvazaar +pacman -S --noconfirm --noprogressbar --needed \ + $MINGW_PACKAGE_PREFIX-gcc \ + $MINGW_PACKAGE_PREFIX-yasm + +# Delete unused packages to reduce space used in the Appveyor cache +pacman -Sc --noconfirm