2025-01-15 19:42:35 +01:00

100 lines
3.1 KiB
YAML

language: haxe
env:
global:
# deploy_key_decrypt
- secure: "cWYcbB7z97sW4yZtz9qcYrEhFZktNjQMOraPm7Vy0FsCMqb4r314Fk8rJze+yDbOKGdsIz6VNHE8nlsQN3EgGiVFJnF8xv6GAlfHPuaVomP2vO7W0A+l7xVy2/326MQJP8JoMgdebDi71yxKeEhYA+mVliI9qql9yfD2YOBmilQ="
matrix:
include:
# haxe development + neko master
- os: linux
language: generic
sudo: required
env:
- TRAVIS_HAXE_VERSION=development
before_install:
- sudo add-apt-repository ppa:haxe/snapshots -y
- sudo apt-get update
- sudo apt-get install haxe=1:3.3* neko-dev libapache2-mod-neko -y
- mkdir ~/haxelib && haxelib setup ~/haxelib
# haxe 3.2.1 + neko master
- os: linux
language: generic
sudo: required
env:
- TRAVIS_HAXE_VERSION=3.2.1
- DEPLOY=1
before_install:
- sudo add-apt-repository ppa:haxe/snapshots -y
- sudo add-apt-repository ppa:haxe/releases -y
- sudo apt-get update
- sudo apt-get install haxe=1:3.2.1* neko-dev libapache2-mod-neko -y
- mkdir ~/haxelib && haxelib setup ~/haxelib
# haxe 3.1.3 + neko 2.0.0
- os: linux
language: haxe
haxe: 3.1.3
sudo: required
env:
- USE_DOCKER=1
services: [docker]
before_install:
- sudo apt-get update
- sudo apt-get -o Dpkg::Options::=--force-confnew install docker-engine -y
- docker --version
# https://docs.travis-ci.com/user/docker/#Using-Docker-Compose
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# Mac
- os: osx
language: haxe
haxe: development
- os: osx
language: haxe
haxe: 3.2.1
- os: osx
language: haxe
haxe: 3.1.3
install:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update;
fi
- npm -g install bower
- yes | haxelib install all
- yes | haxelib install tora
# We need https://github.com/HaxeFoundation/hscript/commit/bd8c016bbadc93c2db8deb75d7056703ac3e3ff8
- if [ "${TRAVIS_HAXE_VERSION}" = "development" ]; then
haxelib git hscript https://github.com/HaxeFoundation/hscript.git;
fi
- haxelib list
- haxelib run tora &
script:
# run our CI script
- haxe ci.hxml
# Deploy to lib.haxe.org
- if [ -n "$deploy_key_decrypt" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ -n "$DEPLOY" ]; then
openssl aes-256-cbc -k "$deploy_key_decrypt" -in deploy_key.enc -out deploy_key -d;
chmod 600 deploy_key;
eval `ssh-agent -s`;
ssh-add deploy_key;
scp haxelib@lib.haxe.org:/data/haxelib/www/.htaccess www/;
scp haxelib@lib.haxe.org:/data/haxelib/www/dbconfig.json www/;
pushd www;
bower install;
popd;
git config --global user.name "TravisCI";
git config --global user.email "travisci@haxe.org";
haxelib run ufront deploy;
fi
cache:
directories:
- deploy
addons:
ssh_known_hosts: lib.haxe.org