From 897e53b430c87d70a1deb016183b96a99ce6db79 Mon Sep 17 00:00:00 2001 From: Bob Burger Date: Mon, 22 Apr 2019 17:53:26 -0400 Subject: [PATCH] add Windows builds and update Linux dist to xenial original commit: e44a209f27f8670c23a1d402b3f968eaa10cad29 --- .travis.yml | 84 +++++++++++++++++++++++++++++++-------------- .travis/build.sh | 15 ++++++++ .travis/dobuild.sh | 27 --------------- .travis/test.sh | 21 ++++++++++++ BUILDING | 17 ++++----- LOG | 3 ++ wininstall/Makefile | 1 + 7 files changed, 107 insertions(+), 61 deletions(-) create mode 100755 .travis/build.sh delete mode 100755 .travis/dobuild.sh create mode 100755 .travis/test.sh diff --git a/.travis.yml b/.travis.yml index 8b2af94730..ca9ea655d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,62 @@ language: c matrix: include: - - os: osx - env: TARGET_MACHINE=i3osx - - os: osx - env: TARGET_MACHINE=ti3osx - - os: osx - env: TARGET_MACHINE=a6osx - - os: osx - env: TARGET_MACHINE=ta6osx - - os: linux - env: TARGET_MACHINE=i3le - sudo: required - - os: linux - env: TARGET_MACHINE=ti3le - sudo: required - - os: linux - env: TARGET_MACHINE=a6le - - os: linux - env: TARGET_MACHINE=ta6le -dist: trusty -addons: - apt: - packages: - - gcc-multilib - - lib32ncurses5-dev - - libx32ncurses5-dev + # macOS + - env: TARGET_MACHINE=i3osx + os: osx + - env: TARGET_MACHINE=ti3osx + os: osx + - env: TARGET_MACHINE=a6osx + os: osx + - env: TARGET_MACHINE=ta6osx + os: osx + + # Linux + - env: TARGET_MACHINE=i3le + os: linux + addons: + apt: + packages: + - gcc-multilib + - lib32ncurses5-dev + - libx32ncurses5-dev + - uuid-dev:i386 + - env: TARGET_MACHINE=ti3le + os: linux + addons: + apt: + packages: + - gcc-multilib + - lib32ncurses5-dev + - libx32ncurses5-dev + - uuid-dev:i386 + - env: TARGET_MACHINE=a6le + os: linux + - env: TARGET_MACHINE=ta6le + os: linux + + # Windows + - env: TARGET_MACHINE=i3nt + os: windows + before_script: + - git config core.autocrlf false; rm .git/index; git reset --hard + - choco install make -y + - env: TARGET_MACHINE=ti3nt + os: windows + before_script: + - git config core.autocrlf false; rm .git/index; git reset --hard + - choco install make -y + - env: TARGET_MACHINE=a6nt + os: windows + before_script: + - git config core.autocrlf false; rm .git/index; git reset --hard + - choco install make -y + - env: TARGET_MACHINE=ta6nt + os: windows + before_script: + - git config core.autocrlf false; rm .git/index; git reset --hard + - choco install make -y +dist: xenial script: - - .travis/dobuild.sh + - .travis/build.sh + - .travis/test.sh diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 0000000000..692ed3057c --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e -o pipefail +echo 'travis_fold:start:build' +echo Building Chez Scheme... +./configure -m=$TARGET_MACHINE +make +case $TARGET_MACHINE in + *a6nt) + curl -Ls https://github.com/burgerrg/win-iconv/releases/download/v0.0.9/iconv-x64.dll > $TARGET_MACHINE/bin/$TARGET_MACHINE/iconv.dll + ;; + *i3nt) + curl -Ls https://github.com/burgerrg/win-iconv/releases/download/v0.0.9/iconv-x86.dll > $TARGET_MACHINE/bin/$TARGET_MACHINE/iconv.dll + ;; +esac +echo 'travis_fold:end:build' diff --git a/.travis/dobuild.sh b/.travis/dobuild.sh deleted file mode 100755 index 569e219f12..0000000000 --- a/.travis/dobuild.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -case $TARGET_MACHINE in - *i3le) sudo apt-get -yq --no-install-suggests --no-install-recommends install uuid-dev:i386 ;; - *) -esac -./configure -m=$TARGET_MACHINE -exitcode=$? -if [ $exitcode -ne 0 ] ; then - echo "Failed: configure step" - exit $exitcode -fi -make -exitcode=$? -if [ $exitcode -ne 0 ] ; then - echo "Failed: make step" - exit $exitcode -fi -( cd ${TARGET_MACHINE}/mats && make partialx 2>&1 ) | tee Make.out | grep '^matting ' -diff -q .travis/summary ${TARGET_MACHINE}/mats/summary -exitcode=$? - -if [ $exitcode -ne 0 ] ; then - echo "Failed: testing step" - echo "mats summary:" - cat ${TARGET_MACHINE}/mats/summary - exit $exitcode -fi diff --git a/.travis/test.sh b/.travis/test.sh new file mode 100755 index 0000000000..38ee73fb95 --- /dev/null +++ b/.travis/test.sh @@ -0,0 +1,21 @@ +#!/bin/bash +runmats() { + echo travis_fold:start:mats + echo make allxhelp "$@" + make -C ${TARGET_MACHINE}/mats allxhelp "$@" 2>&1 | tee -a Make.out | grep '^matting ' + echo travis_fold:end:mats +} + +# Split these out so that we get output every 10 minutes on Windows builds. +runmats o=0 +runmats o=3 +runmats o=3 cp0=t +runmats o=3 cp0=t eval=interpret + +if [ -f ${TARGET_MACHINE}/mats/summary ]; then + cat ${TARGET_MACHINE}/mats/summary + diff -q .travis/summary ${TARGET_MACHINE}/mats/summary + exit $? +else + exit 1 +fi diff --git a/BUILDING b/BUILDING index 24533337c7..5fb42f179f 100644 --- a/BUILDING +++ b/BUILDING @@ -196,19 +196,20 @@ The make file supports several targets: WINDOWS -Building Chez Scheme under 64-bit Windows with Cygwin or Bash/WSL -follows the instructions above, except that 'make install' and 'make -uninstall' are not supported. On Bash/WSL, the build directory must be -in a location with a Windows path such as /mnt/c, and the 'OS' -environment variable must be set to 'Windows_NT' to indicate a build -for Windows, as opposed to a build for Linux on Windows: +Building Chez Scheme under 64-bit Windows with Bash/WSL, MinGW/MSYS, +or Cygwin follows the instructions above, except that 'make install' +and 'make uninstall' are not supported. On Bash/WSL, the build +directory must be in a location with a Windows path such as /mnt/c, +and the 'OS' environment variable must be set to 'Windows_NT' to +indicate a build for Windows, as opposed to a build for Linux on +Windows: env OS=Windows_NT ./configure env OS=Windows_NT make Prerequisites: -* Cygwin or Bash/WSL with bash, git, grep, make, sed, etc. +* Bash/WSL, MinGW/MSYS, or Cygwin with bash, git, grep, make, sed, etc. * Microsoft Visual Studio 2017 or 2015 * WiX Toolset (for making an install) @@ -251,7 +252,7 @@ http://gnuwin32.sourceforge.net/packages/libiconv.htm An alternative that uses the Windows API can be found at: -https://github.com/win-iconv/win-iconv +https://github.com/burgerrg/win-iconv/releases If the DLL is not present, the iconv tests will fail. No other tests should be affected. diff --git a/LOG b/LOG index 9c45a8b29a..c21f0350ef 100644 --- a/LOG +++ b/LOG @@ -1356,3 +1356,6 @@ - fix incorrect uses of fxzero? x86.ss backend, since a 32-bit immediate is not necessarily a fixnum x86.ss +- added MinGW/MSYS build support for Windows and configuration for + Travis-CI testing of all Windows builds + BUILDING, .travis*, wininstall/Makefile diff --git a/wininstall/Makefile b/wininstall/Makefile index 0b23a4313e..b32ace217e 100644 --- a/wininstall/Makefile +++ b/wininstall/Makefile @@ -1,5 +1,6 @@ VERSION := 9.5.3 WIXEXTENSIONS := -ext WixUIExtension -ext WixBalExtension +export MSYS_NO_PATHCONV=1 ChezScheme.exe: x86/bundle.wixobj ChezScheme32.msi ChezScheme64.msi cmd.exe /c light.bat -nologo $(WIXEXTENSIONS) $< -out $@