RECORDANDRONCO/.travis.yml
Paul Chote 255cfee51a Fix travis builds when TRAVIS_TEST_PACKAGING="True"
- Fix "The OpenRA mod template requires makensis." error
- Fix duplicated package generation when building a real release
2019-11-17 14:09:56 +00:00

49 lines
1.7 KiB
YAML

# Travis-CI Build for OpenRAModSDK
# see travis-ci.org for details
dist: xenial
language: csharp
mono: 5.20.1
addons:
apt:
packages:
- dpkg
- liblua5.1-0
script:
- make
- |
. mod.config;
awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format. File must be saved using unix-style (CR, not CRLF) line endings.\n"; travis_terminate 1);
if [ "${TRAVIS_TEST_MOD}" == "True" ]; then
make test || travis_terminate 1;
fi;
if [ "${TRAVIS_TEST_PACKAGING}" == "True" ] || [ -n "${TRAVIS_TAG}" ]; then
wget http://mirrors.kernel.org/ubuntu/pool/universe/n/nsis/nsis-common_3.03-2_all.deb || travis_terminate 1;
wget http://mirrors.kernel.org/ubuntu/pool/universe/n/nsis/nsis_3.03-2_amd64.deb || travis_terminate 1;
sudo dpkg -i nsis-common_3.03-2_all.deb || travis_terminate 1;
sudo dpkg -i nsis_3.03-2_amd64.deb || travis_terminate 1;
fi
if [ "${TRAVIS_TEST_PACKAGING}" == "True" ] && [ -z "${TRAVIS_TAG}" ]; then
make check-packaging-scripts && ./packaging/package-all.sh test-0 || travis_terminate 1;
fi
before_deploy:
- mkdir build
- make check-packaging-scripts && cd build && ../packaging/package-all.sh ${TRAVIS_TAG} ${PWD} && cd ..
deploy:
provider: releases
api_key: ${GH_DEPLOY_API_KEY}
file:
- build/${PACKAGING_INSTALLER_NAME}-${TRAVIS_TAG}-x86.exe
- build/${PACKAGING_INSTALLER_NAME}-${TRAVIS_TAG}-x64.exe
- build/${PACKAGING_INSTALLER_NAME}-${TRAVIS_TAG}-x86-winportable.zip
- build/${PACKAGING_INSTALLER_NAME}-${TRAVIS_TAG}-x64-winportable.zip
- build/${PACKAGING_INSTALLER_NAME}-${TRAVIS_TAG}-macOS.zip
- build/${PACKAGING_INSTALLER_NAME}-${TRAVIS_TAG}-x86_64.AppImage
skip_cleanup: true
on:
tags: true