2018-07-09 18:30:27 +03:00
|
|
|
# Linux Build Configuration for Travis
|
|
|
|
|
|
|
|
language: cpp
|
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
|
|
|
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
env:
|
|
|
|
- DXC_BUILD_TYPE=Release
|
|
|
|
- DXC_BUILD_TYPE=Debug
|
|
|
|
|
|
|
|
compiler:
|
|
|
|
- clang
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources: ubuntu-toolchain-r-test
|
|
|
|
packages: ninja-build g++-5
|
|
|
|
env: DXC_BUILD_TYPE=Debug
|
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources: ubuntu-toolchain-r-test
|
|
|
|
packages: ninja-build g++-5
|
|
|
|
env: DXC_BUILD_TYPE=Release
|
|
|
|
|
|
|
|
cache:
|
|
|
|
apt: true
|
|
|
|
|
|
|
|
git:
|
2018-08-04 02:42:56 +03:00
|
|
|
depth: false
|
2018-07-09 18:30:27 +03:00
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
2018-08-01 17:35:13 +03:00
|
|
|
sources: ubuntu-toolchain-r-test
|
|
|
|
packages: ninja-build libstdc++-5-dev
|
2018-07-09 18:30:27 +03:00
|
|
|
|
|
|
|
before_install:
|
2019-01-14 21:48:21 +03:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip;
|
|
|
|
unzip -q ninja-mac.zip;
|
|
|
|
chmod +x ninja;
|
|
|
|
export PATH="$PWD:$PATH";
|
|
|
|
fi
|
2018-07-09 18:30:27 +03:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- git submodule update --init
|
2020-07-02 18:28:23 +03:00
|
|
|
- if [ ${CC} = gcc ]; then CC=gcc-5; CXX=g++-5; CXX_FLAGS=; else CXX_FLAGS=-Werror; fi
|
2018-07-09 18:30:27 +03:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ulimit -Sn 1024; fi
|
|
|
|
|
|
|
|
script:
|
|
|
|
- mkdir build && cd build
|
|
|
|
- cmake .. -GNinja
|
|
|
|
$(cat ../utils/cmake-predefined-config-params)
|
|
|
|
-DSPIRV_BUILD_TESTS=ON
|
|
|
|
-DCMAKE_BUILD_TYPE=${DXC_BUILD_TYPE}
|
|
|
|
-DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}
|
2020-07-02 18:28:23 +03:00
|
|
|
-DCMAKE_CXX_FLAGS=${CXX_FLAGS}
|
2018-07-09 18:30:27 +03:00
|
|
|
- ninja
|
|
|
|
- ./bin/dxc --help
|
|
|
|
- ./bin/dxc -T ps_6_0 ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
|
|
|
|
- ./bin/dxc -T ps_6_0 -Fo passthru-ps.dxil ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv
|
2018-07-10 20:47:10 +03:00
|
|
|
- ./bin/dxc -T ps_6_0 -Fo passthru-ps.spv ../tools/clang/test/CodeGenSPIRV/passthru-ps.hlsl2spv -spirv
|
2018-07-09 18:30:27 +03:00
|
|
|
- ./bin/clang-spirv-tests --spirv-test-root ../tools/clang/test/CodeGenSPIRV/
|
2018-07-24 21:40:02 +03:00
|
|
|
- ./bin/clang-hlsl-tests --HlslDataDir $PWD/../tools/clang/test/HLSL/
|
2020-04-24 22:22:46 +03:00
|
|
|
|
2020-05-04 20:21:31 +03:00
|
|
|
# TODO: Bundle Linux/macOS build artifacts and upload them to a cloud storage
|
|
|
|
# so users can download and use quickly.
|