4ian/GDevelop:.travis.yml@b5c84bd
language: cpp
sudo: false
compiler:
- gcc
- clang
# Cache .npm folder for faster npm install
cache:
directories:
- $HOME/.npm
env:
global:
- GCC_VERSION="4.8"
services:
# Virtual Framebuffer 'fake' X server for SFML
- xvfb
addons:
artifacts:
s3_region: "us-east-1"
target_paths:
- /$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)/commit/$(git rev-parse HEAD)
- /$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)/latest
paths:
- Binaries/embuild/GDevelop.js
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# Build dependencies:
- cmake
- p7zip-full
- g++-4.8
# SFML dependencies:
- libopenal-dev
- libjpeg-dev
- libglew-dev
- libudev-dev
- libxrandr-dev
- libsndfile1-dev
- libglu1-mesa-dev
- libfreetype6-dev
before_install:
#Activate X Virtual Framebuffer to allow tests to
#use SFML.
- "export DISPLAY=:99.0"
# This workaround is required to avoid libstdc++ errors (Emscripten requires a recent version of libstdc++)
- wget -q -O libstdc++6 http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.12_amd64.deb
- sudo dpkg --force-all -i libstdc++6
install:
#Get the correct version of gcc/g++
- if [ "$CXX" = "g++" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
#Compile the tests only for GDCore and GDCpp
- mkdir .build-tests
- cd .build-tests
- cmake -DBUILD_GDJS=FALSE -DBUILD_TESTS=TRUE -DCMAKE_CXX_COMPILER=$(which $CXX) -DCMAKE_C_COMPILER=$(which $CC) ..
- make -j 4
- cd ..
# Install Emscripten (for GDevelop.js)
- git clone https://github.com/juj/emsdk.git
- cd emsdk
- ./emsdk install 1.39.6
- ./emsdk activate 1.39.6
- source ./emsdk_env.sh
- cd ..
# Install GDevelop.js dependencies and compile it
- cd GDevelop.js
- npm install -g grunt-cli
- npm install
- npm run build
- cd ..
#Install newIDE tests dependencies
- cd newIDE/app && npm install
- cd ../..
#Install GDJS tests dependencies
- cd GDJS && npm install && cd tests && npm install
- cd ../..
script:
# GDCore and GDCpp game engine tests:
- cd .build-tests
- Core/GDCore_tests
- GDCpp/GDCpp_tests
- Extensions/PathfindingBehavior/PathfindingBehavior_Runtime_tests
- Extensions/LinkedObjects/LinkedObjects_Runtime_tests
- cd ..
# GDevelop.js tests
- cd GDevelop.js
- npm test
- cd ..
# newIDE tests:
- cd newIDE/app
- npm test
- npm run flow
- npm run check-format
- cd ../..
# GDJS tests:
- cd GDJS
- npm run check-format
- cd ..
# GDJS game engine tests, disabled on Travis CI because ChromeHeadless can't be started.
# See them running on Semaphore-CI instead: https://semaphoreci.com/4ian/gd
# - cd GDJS/tests && npm test
# - cd ../..
Build Config
{
"go": [
"1.11.4"
],
"os": [
"linux"
],
"env": {
"global": [
"TRAVIS_COMMIT_SHORT=\"$(echo $TRAVIS_COMMIT | cut -b1-7)\"",
"TRAVIS_COMMIT_LESSSHORT=\"$(echo $TRAVIS_COMMIT | cut -b1-9)\""
]
},
"dist": "xenial",
"group": "edge",
"matrix": {
"include": [
{
"name": "linux",
"stage": "test",
"addons": {
"artifacts": {
"paths": [
"./build/linux/amd64/gcloud-cleanup",
"./build/darwin/amd64/gcloud-cleanup",
"./build.tar.gz"
],
"enabled": true,
"target_paths": [
"travis-ci/gcloud-cleanup/$TRAVIS_BRANCH",
"travis-ci/gcloud-cleanup/$TRAVIS_COMMIT",
"travis-ci/gcloud-cleanup/$TRAVIS_COMMIT_SHORT",
"travis-ci/gcloud-cleanup/$TRAVIS_COMMIT_LESSSHORT"
]
}
},
"script": [
"make copyright",
"git diff --exit-code",
"git diff --cached --exit-code",
"make"
],
"after_success": [
"bash <(curl -s https://codecov.io/bash)",
"tar -czvf build.tar.gz build Procfile Makefile"
]
},
{
"if": "type != 'pull_request'",
"name": "docker",
"addons": {
"apt": {
"packages": [
"docker-ce"
]
}
},
"script": [
"export DOCKER_IMAGE_REPO=travisci/gcloud-cleanup",
"export VERSION_VALUE=$(git describe --always --dirty --tags 2>/dev/null)",
"export DOCKER_DEST=$DOCKER_IMAGE_REPO:$VERSION_VALUE",
"docker build -t $DOCKER_DEST .",
"docker run --rm -it $DOCKER_DEST gcloud-cleanup --help",
"script/docker-push $DOCKER_DEST"
]
}
]
},
"language": "go"
}