From b10886bc217c22d18f9256a6351208df478c49c5 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 23 Sep 2019 02:18:45 +0300 Subject: [PATCH] Revert "remove Travis: GitHub CI is a lot faster and more reliable" This reverts commit 9d1814ab81f4de5405cf4176dcbbad7192e58c64. --- .travis.yml | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..82e8caad54 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,89 @@ +language: c +matrix: + include: + - os: linux + name: "linux" + dist: xenial + sudo: required + addons: + apt: + packages: + - build-essential + - libglfw3 + - libglfw3-dev + - libfreetype6-dev + - libssl-dev + - os: windows + name: "windows_gcc" + language: bash + filter_secrets: false + - os: windows + name: "windows_msvc" + language: bash + filter_secrets: false + - os: osx + name: "osx" + osx_image: xcode10.3 + addons: + homebrew: + packages: + - freetype + - glfw + - openssl +script: + - | + if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ + fi + - | + if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then + ### troubleshooting and diagnostics: show ALL environment variables in the instance + #set + set -e + git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries thirdparty/freetype/ + + if [[ "${TRAVIS_JOB_NAME}" == "windows_gcc" ]]; then + echo "Building V with GCC" + export VFLAGS="-os windows" + ./make.bat -gcc + fi + if [[ "${TRAVIS_JOB_NAME}" == "windows_msvc" ]]; then + echo "Building V with MSVC" + export VFLAGS="-os msvc" + ./make.bat -msvc + fi + + ./v.exe test v + set +e + fi + - | + if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then + make + ./v -o v compiler + ./v test v + fi + - | + if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + ## aliases do not work for some reason in travis, just use full commands :-| + echo "Nodejs version:" + node --version + # Build hi.js + echo "fn main(){ println('Hello from V.js') }" > hi.v + ./v -o hi.js hi.v + node hi.js + fi + - | + if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + echo "Nodejs version:" + node --version + # Build hi.js + echo "fn main(){ println('Hello from V.js') }" > hi.v + ./v -o hi.js hi.v + node hi.js + fi + - | + if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then + # Build Vid + git clone https://github.com/vlang/vid + cd vid && ../v -debug -o vid . + fi