-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fc5f58
commit f286257
Showing
1 changed file
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
trigger: | ||
- master | ||
|
||
jobs: | ||
- job: build_ubuntu | ||
displayName: Linux Build | ||
timeoutInMinutes: 0 | ||
|
||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
|
||
steps: | ||
- script: | | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo apt-add-repository -s "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" | ||
sudo apt-get update | ||
sudo apt-get -y install cmake ccache ninja-build clang-9 lld-9 libllvm-9-ocaml-dev libllvm9 llvm-9 llvm-9-dev llvm-9-tools llvm-9-runtime | ||
displayName: Install clang-9 and other dependencies | ||
- script: | | ||
mkdir build | ||
cd build | ||
CC=clang-9 CXX=clang++-9 CXXFLAGS="-msse -msse2" cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX="" -DLLVM_CCACHE_DIR=$HOME/.ccache -DLLVM_CCACHE_BUILD=ON -DLLVM_ENABLE_CXX1Y=ON -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON | ||
displayName: Configure LLVM | ||
- script: | | ||
cd build | ||
ninja | ||
displayName: Build LLVM | ||
- script: | | ||
cd build | ||
DESTDIR=./dest ninja install | ||
cd dest | ||
tar -czf llvmlibs-linux.tar.gz lib include bin | ||
sha256sum ./llvmlibs-linux.tar.gz | awk '{ print $1}' >> llvmlibs-linux.tar.gz.sha256 | ||
displayName: Package LLVM Libraries | ||
- task: GitHubRelease@0 | ||
inputs: | ||
gitHubConnection: RPCS3-Token | ||
repositoryName: RPCS3/llvm | ||
action: edit # Options: create, edit, delete | ||
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit | ||
tagSource: auto # Required when action == Create# Options: auto, manual | ||
#tagPattern: # Optional | ||
tag: 'continuous-linux-master' # Required when action == Edit || Action == Delete || TagSource == Manual | ||
title: 'Linux build' # Optional | ||
#releaseNotesSource: 'file' # Optional. Options: file, input | ||
#releaseNotesFile: # Optional | ||
#releaseNotes: # Optional | ||
assets: 'build/dest/llvmlibs-linux*' # Optional | ||
assetUploadMode: delete # Optional. Options: delete, replace | ||
#isDraft: false # Optional | ||
#isPreRelease: true # Optional | ||
#addChangeLog: true # Optional | ||
#compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag | ||
#releaseTag: # Required when compareWith == LastReleaseByTag | ||
|
||
- job: build_win32 | ||
displayName: Win32 Build | ||
timeoutInMinutes: 0 | ||
|
||
pool: | ||
vmImage: 'windows-2019' | ||
|
||
steps: | ||
- script: | | ||
mkdir llvm_build | ||
cd llvm_build | ||
cmake -G "Visual Studio 16 2019" .. -Thost=x64 -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=ON -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0 | ||
displayName: Configure LLVM | ||
- script: | | ||
cd llvm_build | ||
cmake --build . --config Release -- /maxcpucount | ||
displayName: Build LLVM | ||
- script: | | ||
mkdir llvm_out | ||
cd llvm_out | ||
mkdir build | ||
cd build | ||
mkdir llvm | ||
cd llvm | ||
mkdir cmake | ||
mkdir include | ||
mkdir tools | ||
xcopy "..\..\..\cmake" ".\cmake" /E | ||
xcopy "..\..\..\include" ".\include" /E | ||
cd ..\ | ||
mkdir llvm_build | ||
cd llvm_build | ||
mkdir Release | ||
mkdir include | ||
mkdir lib | ||
cd lib | ||
mkdir cmake | ||
cd ..\ | ||
xcopy "..\..\..\llvm_build\Release" ".\Release" /E | ||
xcopy "..\..\..\llvm_build\include" ".\include" /E | ||
xcopy "..\..\..\llvm_build\lib\cmake" ".\lib\cmake" /E | ||
cd ..\ | ||
7z a -t7z -m0=lzma2 -mx=9 -aoa -r "llvmlibs.7z" * | ||
displayName: Package LLVM Libraries | ||
- task: GitHubRelease@0 | ||
inputs: | ||
gitHubConnection: RPCS3-Token | ||
repositoryName: RPCS3/llvm | ||
action: edit # Options: create, edit, delete | ||
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit | ||
tagSource: auto # Required when action == Create# Options: auto, manual | ||
#tagPattern: # Optional | ||
tag: 'continuous-master' # Required when action == Edit || Action == Delete || TagSource == Manual | ||
title: 'Windows build' # Optional | ||
#releaseNotesSource: 'file' # Optional. Options: file, input | ||
#releaseNotesFile: # Optional | ||
#releaseNotes: # Optional | ||
assets: 'llvm_out/build/llvmlibs.7z' # Optional | ||
assetUploadMode: delete # Optional. Options: delete, replace | ||
#isDraft: false # Optional | ||
#isPreRelease: true # Optional | ||
#addChangeLog: true # Optional | ||
#compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag | ||
#releaseTag: # Required when compareWith == LastReleaseByTag |