diff --git a/appveyor.sh b/appveyor.sh new file mode 100644 index 0000000000..28256478b3 --- /dev/null +++ b/appveyor.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# AppVeyor Continuous Integration for MSYS2 +# Author: Renato Silva + +# Functions +success() { echo "Build success: ${@}"; exit 0; } +failure() { echo "Build failure: ${@}"; exit 1; } + +# Prepare +git config --global user.email 'ci@msys2.org' +git config --global user.name 'MSYS2 AppVeyor CI' + +# Recipes +cd "$(dirname "$0")" +files=($(git show -m --pretty=format: --name-only)) +for file in "${files[@]}"; do + [[ "${file}" = */PKGBUILD ]] && recipes+=("${file}") +done +test -n "${files}" || failure 'could not detect changed files' +test -z "${recipes}" && success 'no changes in package recipes' + +# Build +for recipe in "${recipes[@]}"; do + cd "$(dirname ${recipe})" + makepkg-mingw --syncdeps --noconfirm --skippgpcheck || failure "could not build ${recipe}" + cd - > /dev/null +done diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000..efa4859720 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,2 @@ +build_script: + - C:\msys64\usr\bin\bash --login -c "$(cygpath ${APPVEYOR_BUILD_FOLDER})/appveyor.sh"