forked from ispc/ispc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
91 lines (87 loc) · 3.98 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright (c) 2018-2022, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Author: Dmitry Babokin
# "minimal" instead of "cpp", because of https://github.com/travis-ci/travis-ci/issues/8363
# Otherwise during python invocation PATH is prepended by /usr/bin and it yields wrong llvm-as.
language: minimal
sudo: required
# Note, global env variables are not used, even though they would make sense, because they appear first in
# web view and hide matrix env variables.
jobs:
include:
# ARM build
# LLVM 15.0 + Ubuntu 18.04:
# - ARM only (default): build, lit tests, examples (build)
# - ARM + x86: build, lit tests, examples (build), tests (aarch64)
- stage: test
os: linux
arch: arm64
dist: bionic
env:
- LLVM_VERSION=15.0 OS=Ubuntu18.04aarch64
- LLVM_TAR=llvm-15.0.6-ubuntu18.04aarch64-Release+Asserts-x86.arm.wasm.tar.xz
- LLVM_REPO=https://github.com/ispc/llvm-project
- ISPC_HOME=$TRAVIS_BUILD_DIR
before_install:
- cat /proc/cpuinfo
- sudo apt-get update
- dpkg --print-architecture
- dpkg --print-foreign-architectures
- sudo apt-get install flex libc6-dev libc6-dev-armhf-cross libc6-dev-i386-cross libc6-dev-i386-amd64-cross
- find /usr -name cdefs.h
- if [[ "${TRAVIS_CPU_ARCH}" == "arm64" ]]; then
sudo apt-get install libuv1 rhash libstdc++6;
wget https://anaconda.org/conda-forge/cmake/3.17.0/download/linux-aarch64/cmake-3.17.0-h28c56e5_0.tar.bz2;
mkdir $HOME/cmake;
tar -xjvf cmake-3.17.0-h28c56e5_0.tar.bz2 -C $HOME/cmake;
export PATH=$HOME/cmake/bin:$PATH;
fi
- wget $LLVM_REPO/releases/download/llvm-$LLVM_VERSION-ispc-dev/$LLVM_TAR
- tar xvf $LLVM_TAR
- export PATH=`pwd`/bin-$LLVM_VERSION/bin:$PATH
script:
# "Native-only" build (i.e. only arm and aarch64 are supported).
- mkdir build-arm && cd build-arm
- cmake .. -DCMAKE_CXX_FLAGS="-Werror"
- make -j`nproc`
- make check-all
- bin/ispc --support-matrix
# Cross build (x86, x86-64, arm, aarch64 are supported, Linux only).
- cd ..
- mkdir build-all && cd build-all
- cmake .. -DX86_ENABLED=ON -DCMAKE_CXX_FLAGS="-Werror"
- make -j`nproc`
- make check-all
- bin/ispc --support-matrix
- cp bin/ispc ..
- cd ..
- export ISPC_HOME=`pwd`
- ./run_tests.py --arch=aarch64 --target=neon-i32x4