diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..522888cb --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,25 @@ +branches: + only: + - master + +# Start builds on tags only +# skip_non_tags: true + +environment: + matrix: + - MSYS2_ARCH: i686 + MSYSTEM: MINGW32 + +build_script: + - set + - set PATH=C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH% + - set CHERE_INVOKING=yes + - bash -lc "pacman --noconfirm --ask 20 -Suy" + - bash -lc "bash .appveyor/msys2.sh" + +artifacts: + - path: tools/win_installer/gpodder-*-contents.txt + - path: tools/win_installer/gpodder-*-installer.exe + - path: tools/win_installer/gpodder-*-portable.exe + +deploy: off \ No newline at end of file diff --git a/.appveyor/msys2.sh b/.appveyor/msys2.sh new file mode 100644 index 00000000..7e2b9c65 --- /dev/null +++ b/.appveyor/msys2.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +cd tools/win_installer +# bash -xe to also see commands +bash -e ./build.sh "${APPVEYOR_REPO_COMMIT}" diff --git a/tools/win_installer/_base.sh b/tools/win_installer/_base.sh index 2bd3740c..b6b5872f 100644 --- a/tools/win_installer/_base.sh +++ b/tools/win_installer/_base.sh @@ -33,7 +33,9 @@ function set_build_root { MINGW_ROOT="${BUILD_ROOT}/${MINGW}" } -if [ -d "/home/IEUser" ]; then +if [ "$APPVEYOR" == "True" ]; then + set_build_root "$HOME/_gpodder_build_root" +elif [ -d "/home/IEUser" ]; then set_build_root "/home/IEUser/_gpodder_build_root" else set_build_root "${DIR}/_build_root" diff --git a/tools/win_installer/build.sh b/tools/win_installer/build.sh index 9e99186e..f77e20d0 100644 --- a/tools/win_installer/build.sh +++ b/tools/win_installer/build.sh @@ -15,8 +15,10 @@ function main { [[ -d "${BUILD_ROOT}" ]] && (echo "${BUILD_ROOT} already exists"; exit 1) # started from the wrong env -> switch - if [ $(echo "$MSYSTEM" | tr '[A-Z]' '[a-z]') != "$MINGW" ]; then + if [ -n "$MSYSTEM" ] && [ $(echo "$MSYSTEM" | tr '[A-Z]' '[a-z]') != "$MINGW" ]; then + echo ">>>>> MSYSTEM=${MSYSTEM} - SWITCHING TO ${MINGW} <<<<" "/${MINGW}.exe" "$0" + echo ">>>>> DONE WITH ${MINGW} ?? <<<<" exit $? fi