v/.travis.yml

90 lines
2.2 KiB
YAML
Raw Normal View History

2019-06-26 01:26:26 +02:00
language: c
matrix:
include:
- os: linux
name: "linux"
2019-06-29 02:06:59 +02:00
dist: xenial
2019-06-26 01:26:26 +02:00
sudo: required
addons:
apt:
packages:
2019-09-18 23:03:54 +02:00
- build-essential
- libglfw3
2019-06-29 18:05:57 +02:00
- libglfw3-dev
- libfreetype6-dev
- libssl-dev
2019-07-12 16:10:32 +02:00
- os: windows
name: "windows_gcc"
language: bash
filter_secrets: false
- os: windows
name: "windows_msvc"
language: bash
2019-07-12 16:10:32 +02:00
filter_secrets: false
2019-06-26 01:26:26 +02:00
- os: osx
name: "osx"
2019-09-14 12:10:05 +02:00
osx_image: xcode10.3
2019-06-26 21:14:31 +02:00
addons:
homebrew:
packages:
2019-06-29 18:05:57 +02:00
- freetype
- glfw
2019-08-06 13:37:25 +02:00
- openssl
2019-06-25 06:55:44 +02:00
script:
2019-08-06 13:49:13 +02:00
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
fi
2019-07-12 21:10:22 +02:00
- |
if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
### troubleshooting and diagnostics: show ALL environment variables in the instance
#set
2019-09-03 14:54:45 +02:00
set -e
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries thirdparty/freetype/
2019-09-16 18:02:10 +02:00
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
2019-09-16 18:02:10 +02:00
./v.exe test v
2019-09-03 14:54:45 +02:00
set +e
2019-07-12 21:10:22 +02:00
fi
2019-07-12 20:58:43 +02:00
- |
if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
2019-07-12 21:10:22 +02:00
make
2019-09-16 13:27:23 +02:00
./v -o v compiler
./v test v
2019-07-12 20:58:43 +02:00
fi
2019-09-16 21:00:59 +02:00
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
## aliases do not work for some reason in travis, just use full commands :-|
echo "Nodejs version:"
2019-09-18 23:03:54 +02:00
node --version
2019-09-16 21:00:59 +02:00
# Build hi.js
echo "fn main(){ println('Hello from V.js') }" > hi.v
./v -o hi.js hi.v
2019-09-18 23:03:54 +02:00
node hi.js
2019-09-16 21:00:59 +02:00
fi
2019-08-08 15:17:10 +02:00
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
2019-09-16 21:00:59 +02:00
echo "Nodejs version:"
node --version
2019-09-16 18:02:10 +02:00
# Build hi.js
2019-09-16 21:00:59 +02:00
echo "fn main(){ println('Hello from V.js') }" > hi.v
./v -o hi.js hi.v
2019-09-18 23:03:54 +02:00
node hi.js
2019-09-16 21:00:59 +02:00
fi
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
2019-09-16 20:15:33 +02:00
# Build Vid
git clone https://github.com/vlang/vid
cd vid && ../v -debug -o vid .
fi