Skip to content

Commit

Permalink
- enable just the windows build for now until it works
Browse files Browse the repository at this point in the history
- put the commands in a file to get proper errors
- add a lot of echo to understand where it goes wrong
- install more packages and both 32bit/64bit ones
  • Loading branch information
adrpo committed Jul 24, 2021
1 parent 1853949 commit 4e7e99b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 39 deletions.
29 changes: 29 additions & 0 deletions .msys2-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh -x
echo Target dir: $1
pushd ExternData/Resources/C-Sources

echo Running make: $MAKE
$MAKE CFLAGS="-O3" TARGETDIR="$1"

popd
pushd libxml2/$PLATFORM

which $CMAKE

echo Running cmake: $CMAKE -DZLIB_LIBRARY_RELEASE:FILEPATH="$TRAVIS_BUILD_DIR/ExternData/Resources/Library/$PLATFORM/libzlib.a" -DLIBXML2_WITH_DEBUG:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="$TRAVIS_BUILD_DIR/ExternData/Resources/C-Sources/zlib/" -DLIBXML2_WITH_C14N:BOOL=OFF -DLIBXML2_WITH_CATALOG:BOOL=OFF -DLIBXML2_WITH_DEBUG:BOOL=OFF -DLIBXML2_WITH_DOCB:BOOL=OFF -DLIBXML2_WITH_FTP:BOOL=OFF -DLIBXML2_WITH_HTML:BOOL=OFF -DLIBXML2_WITH_HTTP:BOOL=OFF -DLIBXML2_WITH_ICONV:BOOL=OFF -DLIBXML2_WITH_ICU:BOOL=OFF -DLIBXML2_WITH_ISO8859X:BOOL=OFF -DLIBXML2_WITH_LEGACY:BOOL=OFF -DLIBXML2_WITH_LZMA:BOOL=OFF -DLIBXML2_WITH_MEM_DEBUG:BOOL=OFF -DLIBXML2_WITH_MODULES:BOOL=OFF -DLIBXML2_WITH_OUTPUT:BOOL=OFF -DLIBXML2_WITH_PATTERN:BOOL=OFF -DLIBXML2_WITH_PROGRAMS:BOOL=OFF -DLIBXML2_WITH_PUSH:BOOL=OFF -DLIBXML2_WITH_PYTHON:BOOL=OFF -DLIBXML2_WITH_READER:BOOL=OFF -DLIBXML2_WITH_REGEXPS:BOOL=OFF -DLIBXML2_WITH_RUN_DEBUG:BOOL=OFF -DLIBXML2_WITH_SAX1:BOOL=OFF -DLIBXML2_WITH_SCHEMAS:BOOL=OFF -DLIBXML2_WITH_SCHEMATRON:BOOL=OFF -DLIBXML2_WITH_TESTS:BOOL=OFF -DLIBXML2_WITH_THREADS:BOOL=ON -DLIBXML2_WITH_THREAD_ALLOC:BOOL=OFF -DLIBXML2_WITH_TREE:BOOL=OFF -DLIBXML2_WITH_VALID:BOOL=OFF -DLIBXML2_WITH_WRITER:BOOL=OFF -DLIBXML2_WITH_XINCLUDE:BOOL=OFF -DLIBXML2_WITH_XPATH:BOOL=ON -DLIBXML2_WITH_XPTR:BOOL=OFF -DLIBXML2_WITH_ZLIB:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCPACK_BINARY_7Z:BOOL=OFF -DCPACK_BINARY_IFW:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_NUGET:BOOL=OFF -DCPACK_BINARY_WIX:BOOL=OFF -DCPACK_BINARY_ZIP:BOOL=OFF -DCPACK_SOURCE_7Z:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ../ -G "MSYS Makefiles"

$CMAKE -DZLIB_LIBRARY_RELEASE:FILEPATH="$TRAVIS_BUILD_DIR/ExternData/Resources/Library/$PLATFORM/libzlib.a" -DLIBXML2_WITH_DEBUG:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="$TRAVIS_BUILD_DIR/ExternData/Resources/C-Sources/zlib/" -DLIBXML2_WITH_C14N:BOOL=OFF -DLIBXML2_WITH_CATALOG:BOOL=OFF -DLIBXML2_WITH_DEBUG:BOOL=OFF -DLIBXML2_WITH_DOCB:BOOL=OFF -DLIBXML2_WITH_FTP:BOOL=OFF -DLIBXML2_WITH_HTML:BOOL=OFF -DLIBXML2_WITH_HTTP:BOOL=OFF -DLIBXML2_WITH_ICONV:BOOL=OFF -DLIBXML2_WITH_ICU:BOOL=OFF -DLIBXML2_WITH_ISO8859X:BOOL=OFF -DLIBXML2_WITH_LEGACY:BOOL=OFF -DLIBXML2_WITH_LZMA:BOOL=OFF -DLIBXML2_WITH_MEM_DEBUG:BOOL=OFF -DLIBXML2_WITH_MODULES:BOOL=OFF -DLIBXML2_WITH_OUTPUT:BOOL=OFF -DLIBXML2_WITH_PATTERN:BOOL=OFF -DLIBXML2_WITH_PROGRAMS:BOOL=OFF -DLIBXML2_WITH_PUSH:BOOL=OFF -DLIBXML2_WITH_PYTHON:BOOL=OFF -DLIBXML2_WITH_READER:BOOL=OFF -DLIBXML2_WITH_REGEXPS:BOOL=OFF -DLIBXML2_WITH_RUN_DEBUG:BOOL=OFF -DLIBXML2_WITH_SAX1:BOOL=OFF -DLIBXML2_WITH_SCHEMAS:BOOL=OFF -DLIBXML2_WITH_SCHEMATRON:BOOL=OFF -DLIBXML2_WITH_TESTS:BOOL=OFF -DLIBXML2_WITH_THREADS:BOOL=ON -DLIBXML2_WITH_THREAD_ALLOC:BOOL=OFF -DLIBXML2_WITH_TREE:BOOL=OFF -DLIBXML2_WITH_VALID:BOOL=OFF -DLIBXML2_WITH_WRITER:BOOL=OFF -DLIBXML2_WITH_XINCLUDE:BOOL=OFF -DLIBXML2_WITH_XPATH:BOOL=ON -DLIBXML2_WITH_XPTR:BOOL=OFF -DLIBXML2_WITH_ZLIB:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCPACK_BINARY_7Z:BOOL=OFF -DCPACK_BINARY_IFW:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_NUGET:BOOL=OFF -DCPACK_BINARY_WIX:BOOL=OFF -DCPACK_BINARY_ZIP:BOOL=OFF -DCPACK_SOURCE_7Z:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ../ -G "MSYS Makefiles"

echo Building with cmake
$CMAKE --build .

echo Moving libxml2.a

mv libxml2.a ../../ExternData/Resources/Library/$PLATFORM/libxml2.a
popd

echo Moving libxml2.a

cd ExternData/Resources/Library/$PLATFORM
tar cJf ExternData_$PLATFORM.tar.xz $DEPLOY_LIBS

69 changes: 30 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@ env:

matrix:
include:
- os: linux
compiler: gcc-4.8
env:
- PLATFORM=linux32
- CFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32"
- CXXFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32"
- CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake
- os: linux
compiler: gcc-4.8
env:
- PLATFORM=linux64
- CFLAGS="-O3 -DNDEBUG -fPIC"
- CXXFLAGS="-O3 -DNDEBUG -fPIC"
- CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake
- os: linux
compiler: clang
env:
- PLATFORM=linux64
- CFLAGS="-O3 -DNDEBUG -fPIC"
- CXXFLAGS="-O3 -DNDEBUG -fPIC"
- CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake
- os: osx
compiler: gcc
env:
- PLATFORM=darwin64
- CC=gcc
- CMAKE=cmake
# - os: linux
# compiler: gcc-4.8
# env:
# - PLATFORM=linux32
# - CFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32"
# - CXXFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32"
# - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake
# - os: linux
# compiler: gcc-4.8
# env:
# - PLATFORM=linux64
# - CFLAGS="-O3 -DNDEBUG -fPIC"
# - CXXFLAGS="-O3 -DNDEBUG -fPIC"
# - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake
# - os: linux
# compiler: clang
# env:
# - PLATFORM=linux64
# - CFLAGS="-O3 -DNDEBUG -fPIC"
# - CXXFLAGS="-O3 -DNDEBUG -fPIC"
# - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake
# - os: osx
# compiler: gcc
# env:
# - PLATFORM=darwin64
# - CC=gcc
# - CMAKE=cmake
- os: windows
compiler: gcc
env:
- PLATFORM=mingw64
- CC=gcc
- CMAKE=cmake
- CMAKE=/mingw64/bin/cmake

before_install:
- |-
Expand All @@ -73,7 +73,7 @@ before_install:
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
export mingw64="$msys2 -mingw64 -full-path -here -c \$\* --"
export msys2+=" -msys2 -c \$\* --"
$msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain autoconf autoconf-archive automake automake-wrapper binutils gcc gettext git libtool m4 make pkg-config mingw-w64-x86_64-clang
$msys2 pacman --sync --noconfirm --needed autoconf autoconf-archive automake automake-wrapper binutils gettext git libtool m4 make pkg-config mingw-w64-{i686,x86_64}-toolchain mingw-w64-{i686,x86_64}-clang mingw-w64-{i686,x86_64}-make mingw-w64-{i686,x86_64}-cmake mingw-w64-{i686,x86_64}-extra-cmake-modules mingw-w64-{i686,x86_64}-{gcc,binutils} mingw-w64-{i686,x86_64}-hdf5
## Install more MSYS2 packages from https://packages.msys2.org/base here
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
export PATH=/C/tools/msys64/mingw64/bin:$PATH
Expand Down Expand Up @@ -122,16 +122,7 @@ script:
## nothing yet
;;
windows)
$mingw64 pushd ExternData/Resources/C-Sources
$mingw64 $MAKE CFLAGS="-O3 -msse2" TARGETDIR="mingw64"
$mingw64 popd
$mingw64 pushd libxml2/$PLATFORM
$mingw64 $CMAKE -DZLIB_LIBRARY_RELEASE:FILEPATH="$TRAVIS_BUILD_DIR/ExternData/Resources/Library/$PLATFORM/libzlib.a" -DLIBXML2_WITH_DEBUG:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="$TRAVIS_BUILD_DIR/ExternData/Resources/C-Sources/zlib/" -DLIBXML2_WITH_C14N:BOOL=OFF -DLIBXML2_WITH_CATALOG:BOOL=OFF -DLIBXML2_WITH_DEBUG:BOOL=OFF -DLIBXML2_WITH_DOCB:BOOL=OFF -DLIBXML2_WITH_FTP:BOOL=OFF -DLIBXML2_WITH_HTML:BOOL=OFF -DLIBXML2_WITH_HTTP:BOOL=OFF -DLIBXML2_WITH_ICONV:BOOL=OFF -DLIBXML2_WITH_ICU:BOOL=OFF -DLIBXML2_WITH_ISO8859X:BOOL=OFF -DLIBXML2_WITH_LEGACY:BOOL=OFF -DLIBXML2_WITH_LZMA:BOOL=OFF -DLIBXML2_WITH_MEM_DEBUG:BOOL=OFF -DLIBXML2_WITH_MODULES:BOOL=OFF -DLIBXML2_WITH_OUTPUT:BOOL=OFF -DLIBXML2_WITH_PATTERN:BOOL=OFF -DLIBXML2_WITH_PROGRAMS:BOOL=OFF -DLIBXML2_WITH_PUSH:BOOL=OFF -DLIBXML2_WITH_PYTHON:BOOL=OFF -DLIBXML2_WITH_READER:BOOL=OFF -DLIBXML2_WITH_REGEXPS:BOOL=OFF -DLIBXML2_WITH_RUN_DEBUG:BOOL=OFF -DLIBXML2_WITH_SAX1:BOOL=OFF -DLIBXML2_WITH_SCHEMAS:BOOL=OFF -DLIBXML2_WITH_SCHEMATRON:BOOL=OFF -DLIBXML2_WITH_TESTS:BOOL=OFF -DLIBXML2_WITH_THREADS:BOOL=ON -DLIBXML2_WITH_THREAD_ALLOC:BOOL=OFF -DLIBXML2_WITH_TREE:BOOL=OFF -DLIBXML2_WITH_VALID:BOOL=OFF -DLIBXML2_WITH_WRITER:BOOL=OFF -DLIBXML2_WITH_XINCLUDE:BOOL=OFF -DLIBXML2_WITH_XPATH:BOOL=ON -DLIBXML2_WITH_XPTR:BOOL=OFF -DLIBXML2_WITH_ZLIB:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCPACK_BINARY_7Z:BOOL=OFF -DCPACK_BINARY_IFW:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_NUGET:BOOL=OFF -DCPACK_BINARY_WIX:BOOL=OFF -DCPACK_BINARY_ZIP:BOOL=OFF -DCPACK_SOURCE_7Z:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ../
$mingw64 $CMAKE --build .
$mingw64 mv libxml2.a ../../ExternData/Resources/Library/$PLATFORM/libxml2.a
$mingw64 popd
$mingw64 cd ExternData/Resources/Library/$PLATFORM
$mingw64 tar cJf ExternData_$PLATFORM.tar.xz $DEPLOY_LIBS
$mingw64 chmod +x ./.msys2-build.sh && ./.msys2-build.sh mingw64
;;
esac
Expand Down

0 comments on commit 4e7e99b

Please sign in to comment.