diff --git a/.travis.yml b/.travis.yml index 4101a450d1..6e604c7b54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,25 @@ -sudo: required -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-5 - - g++-5 - - make +language: c +matrix: + include: + - os: linux + sudo: required + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-5 + - g++-5 + - make + - os: osx + osx_image: xcode10.2 + env: + - MATRIX_EVAL="brew install glm freetype cjson glfw" script: - - sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc + - | + if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then + sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc + fi - export VROOT=$(pwd) - cd ./compiler - make diff --git a/compiler/Makefile b/compiler/Makefile index f36a56dfda..0fee7073e9 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -7,8 +7,8 @@ v: v.c v.c: wget https://raw.githubusercontent.com/vlang/vc/master/v.c -test: - find .. -name '*_test.v' | xargs v {} +test: v + find .. -name '*_test.v' | xargs ./v {} clean: -rm v.c diff --git a/glm/glm_test.v b/glm/glm_test.v index 2494787b4d..a1ff2bb1c6 100644 --- a/glm/glm_test.v +++ b/glm/glm_test.v @@ -6,7 +6,7 @@ import os import gl import gg -fn cmp(a, b float) bool { +fn cmp(a, b f32) bool { return int(a * 1000) == int(b * 1000) }