Skip to content

Commit

Permalink
First test for AppVeyor's MSYS2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
xfred81 committed May 28, 2018
1 parent 5902592 commit 1c77f36
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 1 deletion.
30 changes: 30 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 1.0.{build}
image: Visual Studio 2017
clone_folder: c:\projects\src
# Do not build on tags
skip_tags: true
init:
- cmd: >-
c:\msys64\usr\bin\bash -lc "echo MSYSTEM=%MSYSTEM% > /appveyor.environment"
environment:
matrix:
- MSYSTEM: MINGW32
- MSYSTEM: MINGW64
install:
- cmd: >-
c:\msys64\usr\bin\bash -lc "cd /c/projects/src/share && ./appveyor-install.sh"
build_script:
- cmd: c:\msys64\usr\bin\bash -lc "cd /c/projects/src/share && ./appveyor-build.sh"

deploy:
- provider: GitHub
release: v$(appveyor_build_version)
auth_token:
secure: sZu+i3QuPeW93JlxEBOJ7E1WYsAZQtIsOHVjzftLxkBvBKX/9Akt4GRYUdQWK3/Z
artifact: goffice
draft: false
prerelease: true
on:
branch:
- msys2
8 changes: 7 additions & 1 deletion goffice/math/go-math.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ long double modfl (long double x, long double *iptr);

#endif

#ifdef _MSC_VER
/* testing GOFFICE_WITH_WINREG to check if we are using Windows (MSYS2) */
#if _MSC_VER
#define isnan _isnan
#endif

#if (GOFFICE_WITH_WINREG==1)
# define isnanl _isnan
#endif


/* ------------------------------------------------------------------------- */

G_END_DECLS
Expand Down
29 changes: 29 additions & 0 deletions share/appveyor-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

source /appveyor.environment
export MSYSTEM

cd /c/projects/src
./autogen.sh

./configure --prefix /inst/

v=$(grep goffice_full_version config.h | cut -f2 -d '"')
v="$v-$(date +'%Y.%m.%d-%H')"
powershell.exe -command "Update-AppveyorBuild -Version \"$v\""
echo "Version=$v"

make -j 2
make install

if [ $MSYSTEM = "MINGW32" ]; then
bits="32bit"
else
bits="64bit"
fi

fn="goffice-$bits-$v-archive.zip"

zip -9r $fn /inst/*

powershell.exe -command "Push-AppveyorArtifact \"$fn\" -DeploymentName \"goffice\""
24 changes: 24 additions & 0 deletions share/appveyor-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

source /appveyor.environment
export MSYSTEM

if test "$MSYSTEM"x == "MINGW64"x; then
i_pkg_postfix="w64-x86_64"
else
i_pkg_postfix="w64-i686"
fi

pacman -S --noconfirm glib2
pacman -S --noconfirm zip
pacman -S --noconfirm glib2-devel
# pacman -S --noconfirm mingw-w64-glib-networking
# pacman -S --noconfirm mingw-w64-gdk-pixbuf2
pacman -S --noconfirm mingw-$i_pkg_postfix-gtkmm3
pacman -S --noconfirm mingw-$i_pkg_postfix-libgsf
pacman -S --noconfirm mingw-$i_pkg_postfix-libxml2
pacman -S --noconfirm mingw-$i_pkg_postfix-pango
pacman -S --noconfirm mingw-$i_pkg_postfix-pangocairo
pacman -S --noconfirm mingw-$i_pkg_postfix-cairo
pacman -S --noconfirm mingw-$i_pkg_postfix-libxslt
pacman -S --noconfirm gtk-doc

0 comments on commit 1c77f36

Please sign in to comment.