mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
81 lines
2.4 KiB
YAML
81 lines
2.4 KiB
YAML
# Travis CI configuration to build and run all tests
|
|
# (and typing/formatting) for the Core, newIDE, GDJS.
|
|
#
|
|
# See also Semaphore CI for quick tests (not building GDevelop.js, so
|
|
# faster but not always reliable).
|
|
|
|
language: cpp
|
|
sudo: false
|
|
compiler:
|
|
- clang
|
|
|
|
# Cache .npm folder for faster npm install
|
|
cache:
|
|
directories:
|
|
- $HOME/.npm
|
|
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
# Build dependencies:
|
|
- cmake
|
|
- p7zip-full
|
|
|
|
before_install:
|
|
# 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:
|
|
# Ensure we use a recent version of Node.js (and npm).
|
|
- nvm install v16 && nvm use v16
|
|
#Compile the tests only for GDCore
|
|
- 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)
|
|
# Specify the tag for the core repository to avois breaking changes.
|
|
- git clone --depth 1 --branch 3.1.21 https://github.com/juj/emsdk.git
|
|
- cd emsdk && ./emsdk install 3.1.21 && ./emsdk activate 3.1.21 && cd ..
|
|
# Install GDevelop.js dependencies
|
|
- cd GDevelop.js && npm install && cd ..
|
|
# Build GDevelop.js
|
|
# (in a subshell to avoid Emscripten polluting the Node.js and npm version for the rest of the build)
|
|
- (set -e; cd GDevelop.js && source ../emsdk/emsdk_env.sh && npm run build && cd ..)
|
|
# Install newIDE tests dependencies
|
|
- npm -v
|
|
- cd newIDE/app && npm install
|
|
- cd ../..
|
|
# Install GDJS tests dependencies
|
|
- cd GDJS && npm install && cd tests && npm install
|
|
- cd ../..
|
|
|
|
script:
|
|
# GDCore tests:
|
|
- cd .build-tests
|
|
- Core/GDCore_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
|
|
- npm run check-script-types
|
|
- 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://gdevelop.semaphoreci.com/projects/GDevelop
|
|
# - cd GDJS/tests && npm test
|
|
# - cd ../..
|