Related work item: Github #17
This commit is contained in:
Minmin Gong 2018-12-01 21:48:47 -08:00
Родитель 1bdc200b75
Коммит d592b4ea5a
5 изменённых файлов: 199 добавлений и 139 удалений

Просмотреть файл

@ -1,38 +0,0 @@
version: '{branch}-{build}'
clone_depth: 5
platform:
- x64
configuration:
- Release
environment:
COMBINATION: win-%COMPILER%-%PLATFORM%-%CONFIGURATION%
ARTIFACTS_ZIP_NAME: ShaderConductor-%COMBINATION%-artifacts.zip
BUILD_DIR: ninja-%COMBINATION%
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
COMPILER: vc140
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
COMPILER: vc141
install:
- choco install ninja
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- python BuildAll.py ninja %COMPILER% %PLATFORM% %CONFIGURATION%
test_script:
- Build\%BUILD_DIR%\Bin\ShaderConductorTest.exe
after_test:
- cd Build\%BUILD_DIR%
- echo %APPVEYOR_REPO_COMMIT% > GIT-COMMIT.txt
- xcopy "%APPVEYOR_BUILD_FOLDER%\Include\ShaderConductor" Include\ShaderConductor /s /i /y
- 7z a %ARTIFACTS_ZIP_NAME% Include Lib\ShaderConductor.lib Bin\ShaderConductor.dll Bin\ShaderConductorCmd.exe Bin\dxcompiler.dll GIT-COMMIT.txt
artifacts:
- path: Build\%BUILD_DIR%\%ARTIFACTS_ZIP_NAME%

Просмотреть файл

@ -1,97 +0,0 @@
language: cpp
git:
depth: 5
quiet: true
cache:
apt: true
matrix:
include:
- os: linux
dist: trusty
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- ninja-build
update:
- true
env: MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" COMPILER="gcc"
- os: linux
dist: xenial
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- ninja-build
update:
- true
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" COMPILER="gcc"
- os: linux
dist: trusty
sudo: required
addons:
apt:
sources:
- llvm-toolchain-trusty-6.0
- ubuntu-toolchain-r-test
packages:
- clang-6.0
- libstdc++-6-dev
- ninja-build
update:
- true
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0" COMPILER="clang"
- os: linux
dist: xenial
sudo: required
addons:
apt:
sources:
- llvm-toolchain-xenial-7
- ubuntu-toolchain-r-test
packages:
- clang-7
- libstdc++-7-dev
- ninja-build
update:
- true
env: MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" COMPILER="clang"
- os: osx
osx_image: xcode9.4
addons:
homebrew:
packages:
- ninja
update:
- true
env: MATRIX_EVAL="CC=clang && CXX=clang++" COMPILER="clang"
- os: osx
osx_image: xcode10.1
addons:
homebrew:
packages:
- ninja
update:
- true
env: MATRIX_EVAL="CC=clang && CXX=clang++" COMPILER="clang"
before_install:
- eval "${MATRIX_EVAL}"
script:
- python BuildAll.py ninja $COMPILER x64 Release
- ./Build/ninja-$TRAVIS_OS_NAME-$COMPILER-x64-Release/Bin/ShaderConductorTest

Просмотреть файл

@ -0,0 +1,34 @@
steps:
- bash: eval '$(installCommand)'
displayName: 'Install'
- task: PythonScript@0
displayName: 'Build'
inputs:
scriptPath: BuildAll.py
arguments: 'ninja $(compiler) $(platform) $(configuration)'
- bash: eval '$(testCommand)'
displayName: 'Test'
- bash: 'echo $BUILD_SOURCEVERSION > $BUILD_ARTIFACTSTAGINGDIRECTORY/GIT-COMMIT.txt'
displayName: 'Add commit info'
- task: CopyFiles@2
displayName: 'Copy Headers'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: Include/ShaderConductor/ShaderConductor.hpp
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
displayName: 'Copy Binaries'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/$(buildFolder)'
Contents: $(artifactBinaries)
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: ShaderConductor-$(combination)

Просмотреть файл

@ -1,7 +1,6 @@
# ShaderConductor
[![Build status](https://ci.appveyor.com/api/projects/status/x7ni6wjrdbw4e86q/branch/master?svg=true)](https://ci.appveyor.com/project/gongminmin/shaderconductor/branch/master)
[![Build Status](https://travis-ci.org/Microsoft/ShaderConductor.svg?branch=master)](https://travis-ci.org/Microsoft/ShaderConductor)
[![Build Status](https://dev.azure.com/msft-ShaderConductor/public/_apis/build/status/ShaderConductor-CI)](https://dev.azure.com/msft-ShaderConductor/public/_build/latest?definitionId=1)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
@ -62,8 +61,7 @@ After building, the output file ShaderConductor.dll can be located in \<YourCMak
### Artifacts
You can download the prebuilt binaries generated by CI system:
* [Windows x64 Release](https://ci.appveyor.com/project/gongminmin/shaderconductor/branch/master/artifacts)
You can download [the prebuilt binaries generated by CI system](https://dev.azure.com/msft-ShaderConductor/public/_build/latest?definitionId=1&view=results). Currently, artifacts for Windows, Linux, macOS are published every commit.
## License

163
azure-pipelines.yml Normal file
Просмотреть файл

@ -0,0 +1,163 @@
variables:
configuration: Release
platform: x64
resources:
- repo: self
fetchDepth: 5
jobs:
- job: Windows_vc140
pool:
vmImage: VS2017-Win2016
variables:
compiler: vc140
combination: 'win-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: 'choco install ninja'
testCommand: './$(buildFolder)/Bin/ShaderConductorTest.exe'
artifactBinaries: |
Bin/ShaderConductor.dll
Bin/ShaderConductorCmd.exe
Bin/dxcompiler.dll
Lib/ShaderConductor.lib
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml
- job: Windows_vc141
pool:
vmImage: VS2017-Win2016
variables:
compiler: vc141
combination: 'win-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: 'choco install ninja'
testCommand: './$(buildFolder)/Bin/ShaderConductorTest.exe'
artifactBinaries: |
Bin/ShaderConductor.dll
Bin/ShaderConductorCmd.exe
Bin/dxcompiler.dll
Lib/ShaderConductor.lib
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml
- job: Linux_gcc7
pool:
vmImage: Ubuntu-16.04
variables:
compiler: gcc7
combination: 'linux-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-7 ninja-build
testCommand: './$(buildFolder)/Bin/ShaderConductorTest'
artifactBinaries: |
Bin/ShaderConductorCmd
Lib/libdxcompiler.so
Lib/libShaderConductor.so
CC: gcc-7
CXX: g++-7
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml
- job: Linux_gcc8
pool:
vmImage: Ubuntu-16.04
variables:
compiler: gcc8
combination: 'linux-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-8 ninja-build
testCommand: './$(buildFolder)/Bin/ShaderConductorTest'
artifactBinaries: |
Bin/ShaderConductorCmd
Lib/libdxcompiler.so
Lib/libShaderConductor.so
CC: gcc-8
CXX: g++-8
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml
- job: Linux_clang6
pool:
vmImage: Ubuntu-16.04
variables:
compiler: clang6
combination: 'linux-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: |
sudo add-apt-repository ppa:llvm-toolchain-xenial-6.0/main
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install clang-6.0 libstdc++-6-dev lld-6.0 ninja-build
testCommand: './$(buildFolder)/Bin/ShaderConductorTest'
artifactBinaries: |
Bin/ShaderConductorCmd
Lib/libdxcompiler.so
Lib/libShaderConductor.so
CC: clang-6.0
CXX: clang++-6.0
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml
- job: Linux_clang7
pool:
vmImage: Ubuntu-16.04
variables:
compiler: clang7
combination: 'linux-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: |
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install clang-7 libstdc++-7-dev lld-7 ninja-build
testCommand: './$(buildFolder)/Bin/ShaderConductorTest'
artifactBinaries: |
Bin/ShaderConductorCmd
Lib/libdxcompiler.so
Lib/libShaderConductor.so
CC: clang-7
CXX: clang++-7
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml
- job: macOS_10_clang
pool:
vmImage: macOS 10.13
variables:
compiler: clang9
combination: 'osx-$(compiler)-$(platform)-$(configuration)'
buildFolder: 'Build/ninja-$(combination)'
installCommand: |
brew update
brew install ninja
testCommand: './$(buildFolder)/Bin/ShaderConductorTest'
artifactBinaries: |
Bin/ShaderConductorCmd
Lib/libdxcompiler.dylib
Lib/libShaderConductor.dylib
CC: clang
CXX: clang++
steps:
- template: CI/AzurePipelines/ContinuousBuild.yml