Procházet zdrojové kódy

[linux-port] Enable Travis Linux and macOS bots. (#1407)

Ehsan před 7 roky
rodič
revize
367b193254
2 změnil soubory, kde provedl 76 přidání a 0 odebrání
  1. 75 0
      .travis.yml
  2. 1 0
      README.md

+ 75 - 0
.travis.yml

@@ -0,0 +1,75 @@
+# Linux Build Configuration for Travis
+
+language: cpp
+
+os:
+  - linux
+  - osx
+
+# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
+sudo: required
+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
+  allow_failures:
+    - os: linux
+    - os: osx
+
+cache:
+  apt: true
+
+git:
+  depth: 1
+
+branches:
+  only:
+    - master
+
+addons:
+  apt:
+    packages:
+      - ninja-build
+
+before_install:
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja; fi
+
+before_script:
+  - git submodule update --init
+  - if [ ${CC} = gcc ]; then CC=gcc-5; CXX=g++-5; fi
+  - 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}
+  - 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
+  - cmp passthru-ps.dxil ../tools/clang/test/CodeGenSPIRV/passthru-ps.${DXC_BUILD_TYPE}.dxil
+  - ./bin/clang-spirv-tests --spirv-test-root ../tools/clang/test/CodeGenSPIRV/

+ 1 - 0
README.md

@@ -1,6 +1,7 @@
 # DirectX Shader Compiler
 
 [![Build status](https://ci.appveyor.com/api/projects/status/oaf66n7w30xbrg38/branch/master?svg=true)](https://ci.appveyor.com/project/antiagainst/directxshadercompiler/branch/master)
+[![Build Status](https://travis-ci.org/Microsoft/DirectXShaderCompiler.svg?branch=master)](https://travis-ci.org/Microsoft/DirectXShaderCompiler)
 
 The DirectX Shader Compiler project includes a compiler and related tools used to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate Language (DXIL) representation. Applications that make use of DirectX for graphics, games, and computation can use it to generate shader programs.