From 497486d429e7a65aa378963420dab074947bfbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Farneb=C3=A4ck?= Date: Thu, 29 Oct 2020 19:27:46 +0100 Subject: [PATCH] Add Travis configuration. (#1) Add Travis configuration. --- .travis.yml | 40 ++++++++++++++++++++++++++++++++++++++++ test/runtests.jl | 6 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..af664f1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,40 @@ +language: julia +os: + - linux + - osx + - windows +julia: + - 1.3 + - 1.4 + - 1.5 + - nightly +addons: + apt: + sources: + - ubuntu-toolchain-r-test +before_install: + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ $TRAVIS_CPU_ARCH != "arm64" ]; then sudo apt-get install gcc-8 gcc-8-multilib linux-libc-dev linux-headers-generic; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ $TRAVIS_CPU_ARCH != "arm64" ]; then sudo ln -s /usr/bin/gcc-8 /usr/local/bin/gcc; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ $TRAVIS_CPU_ARCH != "arm64" ]; then sudo ln -s /usr/include/asm-generic /usr/include/asm; fi + - which gcc + - gcc --version +arch: + - amd64 + - arm64 +jobs: + fast_finish: true + allow_failures: + # - julia: nightly + exclude: + - os: osx + arch: arm64 + - os: windows + arch: arm64 +branches: + only: + - master + - /^release-.*/ + - /^v[0-9]+\.[0-9]+\.[0-9]+$/ # version tags +notifications: + email: false diff --git a/test/runtests.jl b/test/runtests.jl index db55611..b2e63d2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -33,9 +33,13 @@ end cfunctions_path = abspath(dirname(@__DIR__), "src", "julia_cfunctions.jl") +# `VERSION` is usually not the same as this for nightly builds. +# TODO: Find out whether there's some more convenient way to get +# exactly the same string as this `ccall`. +version_string = unsafe_string(ccall(:jl_ver_string, Ptr{Cchar}, ())) expected_stdout = """ - Julia version $(VERSION) + Julia version $(version_string) 0.5 fibonacci(10) = 55 """