Windows build using appveyor (#467)

Same build script as manual build. See tools/win_installer
Only building i686 for now.
This commit is contained in:
Eric Le Lay 2018-05-27 13:33:27 +02:00 committed by GitHub
parent 229844cf5c
commit ec0df6544a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 2 deletions

25
.appveyor.yml Normal file
View File

@ -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

7
.appveyor/msys2.sh Normal file
View File

@ -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}"

View File

@ -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"

View File

@ -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