Skip to content

Commit

Permalink
travis: add 32bit linux testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alaviss committed May 27, 2019
1 parent 55594d8 commit b1f997f
Showing 1 changed file with 55 additions and 7 deletions.
62 changes: 55 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,55 @@ matrix:

include:
- os: linux
env: NIM_COMPILE_TO_CPP=false
env:
- NIM_COMPILE_TO_CPP=false
- CPU=amd64

- os: linux
env:
- NIM_COMPILE_TO_CPP=false
- CPU=i386
- DOCKER_BASE_IMAGE=i386/ubuntu:xenial
- DOCKER_IMAGE=nim-ci

language: minimal
services: docker

addons:
install:
# heredoc can't be used here due to how travis launches commands
- |
docker build -t "$DOCKER_IMAGE" - <<< "
FROM $DOCKER_BASE_IMAGE
RUN apt-get update -qq
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
gcc g++ libc6-dev make nodejs libcurl4-openssl-dev libsdl1.2-dev \
libgc-dev libsfml-dev locales
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV PATH=\"/nim/bin\${PATH:+:\${PATH}}\"
"
- export CC=gcc
# seccomp has to be disabled for coroutines & boehm tests due to
# usage of getcontext() on 32bit linux. See moby/moby#28162
- >
containerId=$(docker run --security-opt seccomp=unconfined -e TRAVIS
-e NIM_COMPILE_TO_CPP -e CC -v "$PWD":/nim -w /nim
-itd "$DOCKER_IMAGE")
- |
run() {
docker exec -it "$containerId" bash -c "$*"
}
- os: osx
env: NIM_COMPILE_TO_CPP=false
env:
- NIM_COMPILE_TO_CPP=false
- CPU=amd64

- os: osx
env: NIM_COMPILE_TO_CPP=true
env:
- NIM_COMPILE_TO_CPP=true
- CPU=amd64

# To allow failures for a failing configuration, use something like:
# allow_failures:
Expand All @@ -34,16 +76,22 @@ addons:
- make
- sfml

install:
- |
run() {
"$@"
}
before_script:
- git clone --depth 1 https://github.com/nim-lang/csources.git
- make -C csources -j 2 LD=$CC
- run make -C csources -j 2 LD=$CC ucpu=$CPU
- export PATH=$(pwd)/bin${PATH:+:$PATH}

script:
- echo "travis_fold:start:nim_c_koch"
- nim c koch
- run nim c koch
- echo "travis_fold:end:nim_c_koch"
- ./koch runCI
- run ./koch runCI

before_deploy:
# Make https://nim-lang.github.io/Nim work the same as https://nim-lang.github.io/Nim/overview.html
Expand All @@ -59,4 +107,4 @@ deploy: # https://nim-lang.github.io/Nim
branch: devel

# Extract failed tests
after_failure: nim c -r tools/ci_testresults.nim
after_failure: run nim c -r tools/ci_testresults.nim

0 comments on commit b1f997f

Please sign in to comment.