2019-06-26 02:26:26 +03:00
|
|
|
language: c
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2019-09-15 15:52:12 +03:00
|
|
|
name: "linux"
|
2019-06-29 03:06:59 +03:00
|
|
|
dist: xenial
|
2019-06-26 02:26:26 +03:00
|
|
|
sudo: required
|
|
|
|
addons:
|
2019-09-16 22:00:59 +03:00
|
|
|
snaps:
|
|
|
|
- name: node
|
|
|
|
channel: latest/edge
|
|
|
|
confinement: classic
|
2019-06-26 02:26:26 +03:00
|
|
|
apt:
|
|
|
|
sources:
|
2019-06-29 19:05:57 +03:00
|
|
|
- ubuntu-toolchain-r-test
|
2019-06-26 02:26:26 +03:00
|
|
|
packages:
|
2019-06-29 19:05:57 +03:00
|
|
|
- gcc-5
|
|
|
|
- g++-5
|
|
|
|
- make
|
2019-08-27 13:21:05 +03:00
|
|
|
- libglfw3
|
2019-06-29 19:05:57 +03:00
|
|
|
- libglfw3-dev
|
2019-08-27 13:21:05 +03:00
|
|
|
- libfreetype6-dev
|
2019-08-06 18:21:30 +03:00
|
|
|
- libssl-dev
|
2019-07-12 17:10:32 +03:00
|
|
|
- os: windows
|
2019-09-15 15:52:12 +03:00
|
|
|
name: "windows_gcc"
|
|
|
|
language: bash
|
|
|
|
filter_secrets: false
|
|
|
|
- os: windows
|
|
|
|
name: "windows_msvc"
|
|
|
|
language: bash
|
2019-07-12 17:10:32 +03:00
|
|
|
filter_secrets: false
|
2019-06-26 02:26:26 +03:00
|
|
|
- os: osx
|
2019-09-15 15:52:12 +03:00
|
|
|
name: "osx"
|
2019-09-14 13:10:05 +03:00
|
|
|
osx_image: xcode10.3
|
2019-06-26 22:14:31 +03:00
|
|
|
addons:
|
|
|
|
homebrew:
|
|
|
|
packages:
|
2019-06-29 19:05:57 +03:00
|
|
|
- freetype
|
|
|
|
- glfw
|
2019-08-06 14:37:25 +03:00
|
|
|
- openssl
|
2019-06-25 07:55:44 +03:00
|
|
|
script:
|
2019-06-26 02:26:26 +03:00
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
|
|
|
sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
|
|
|
|
fi
|
2019-08-06 14:49:13 +03:00
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
|
|
|
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
|
2019-08-27 13:21:05 +03:00
|
|
|
fi
|
2019-07-12 22:10:22 +03:00
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
|
2019-09-15 15:52:12 +03:00
|
|
|
### troubleshooting and diagnostics: show ALL environment variables in the instance
|
|
|
|
#set
|
2019-09-03 15:54:45 +03:00
|
|
|
set -e
|
2019-08-26 13:51:48 +03:00
|
|
|
git clone --depth=1 https://github.com/ubawurinna/freetype-windows-binaries thirdparty/freetype/
|
2019-09-16 19:02:10 +03:00
|
|
|
|
2019-09-15 15:52:12 +03: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 19:02:10 +03:00
|
|
|
|
2019-09-15 15:52:12 +03:00
|
|
|
### running just repl_test.v produces failing results earlier and is easier to read
|
|
|
|
echo "Running only the repl tests directly..."
|
|
|
|
./v.exe ./compiler/tests/repl/repl_test.v
|
|
|
|
echo "Running ALL tests..."
|
2019-08-27 21:08:54 +03:00
|
|
|
./v.exe test v
|
2019-09-03 15:54:45 +03:00
|
|
|
set +e
|
2019-07-12 22:10:22 +03:00
|
|
|
fi
|
2019-07-12 21:58:43 +03:00
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
|
2019-07-12 22:10:22 +03:00
|
|
|
make
|
2019-09-16 14:27:23 +03:00
|
|
|
./v -o v compiler
|
2019-08-27 13:21:05 +03:00
|
|
|
./v test v
|
2019-07-12 21:58:43 +03:00
|
|
|
fi
|
2019-09-16 22:00:59 +03:00
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
|
|
|
## aliases do not work for some reason in travis, just use full commands :-|
|
|
|
|
echo "Nodejs version:"
|
|
|
|
snap run node --version
|
|
|
|
# Build hi.js
|
|
|
|
echo "fn main(){ println('Hello from V.js') }" > hi.v
|
|
|
|
./v -o hi.js hi.v
|
|
|
|
snap run node hi.js
|
|
|
|
fi
|
2019-08-08 16:17:10 +03:00
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
2019-09-16 22:00:59 +03:00
|
|
|
echo "Nodejs version:"
|
|
|
|
node --version
|
2019-09-16 19:02:10 +03:00
|
|
|
# Build hi.js
|
2019-09-16 22:00:59 +03:00
|
|
|
echo "fn main(){ println('Hello from V.js') }" > hi.v
|
|
|
|
./v -o hi.js hi.v
|
|
|
|
## the node on osx requires --harmony-class-fields for now
|
|
|
|
node --harmony-class-fields hi.js
|
|
|
|
fi
|
|
|
|
- |
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
|
2019-09-16 21:15:33 +03:00
|
|
|
# Build Vid
|
|
|
|
git clone https://github.com/vlang/vid
|
|
|
|
cd vid && ../v -debug -o vid .
|
2019-08-27 13:21:05 +03:00
|
|
|
fi
|