Skip to content

Commit

Permalink
Add travis_build.sh PLATFORM=mingw_on_linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Coman authored and Ben Coman committed Jan 8, 2019
1 parent 1754361 commit cc96583
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
@@ -1,3 +1,5 @@
dist: xenial

language: c

sudo: required
Expand Down Expand Up @@ -74,7 +76,7 @@ jobs:
# <<: *mac-build
#
- stage: "Stack builds"
env: ARCH="build.mingw32x86-on-linux" FLAVOR="squeak.stack.spur"
env: ARCH="mingw32x86-on-linux" FLAVOR="squeak.stack.spur"
# env: ARCH="linux64x64" FLAVOR="newspeak.stack.spur"
# - env: ARCH="linux64x64" FLAVOR="squeak.stack.spur"
# - env: ARCH="linux32x86" FLAVOR="newspeak.stack.spur"
Expand Down
21 changes: 20 additions & 1 deletion scripts/ci/travis_build.sh
@@ -1,5 +1,5 @@
#!/bin/bash -x
set -e
set -e

env

Expand All @@ -19,6 +19,8 @@ if [[ "${APPVEYOR}" ]]; then
echo
test -d /usr/i686-w64-mingw32/sys-root/mingw/lib || echo "No lib dir"
test -d /usr/i686-w64-mingw32/sys-root/mingw/include || echo "No inc dir"
elif [[ "${ARCH}" == "mingw"*"on-linux" ]]; then
PLATFORM="mingw_on_linux"
else
PLATFORM="${TRAVIS_OS_NAME}"
fi
Expand Down Expand Up @@ -116,6 +118,23 @@ build_windows() {
popd
}

build_mingw_on_linux() {
[[ ! -d "${BUILD_DIRECTORY}" ]] && exit 150

pushd "${BUILD_DIRECTORY}"
travis_fold start build_vm "Building OpenSmalltalk VM..."
find /usr/bin | grep mingw | grep gcc
echo PATH=${PATH}
bash -e ./mvm -f
travis_fold end build_vm

pwd
ls -F
zip -r "Squeak-Windows(${ARCH}-${FLAVOUR})" . build/
popd
find . -name "Squeak-Windows*"
}

if [[ ! $(type -t build_$PLATFORM) ]]; then
echo "Unsupported platform '$(uname -s)'." 1>&2
exit 99
Expand Down
6 changes: 5 additions & 1 deletion scripts/ci/travis_test.sh
Expand Up @@ -2,8 +2,12 @@
set -e

# Don't run tests on ARM (ARM builds already take a long time)
[[ "${ARCH}" == *"ARM"* ]] && exit 0
[[ "${ARCH}" == *"ARM"* ]] && exit 0

# Can't test a Windows executable on a Linux box
[[ "${ARCH}" == *"mingw"* ]] && exit 0

# Test these...
case "${FLAVOR}" in
"squeak"*|"pharo"*)
"./tests/smalltalkCI.sh"
Expand Down

0 comments on commit cc96583

Please sign in to comment.