forked from terralang/terra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
105 lines (93 loc) · 4.31 KB
/
appveyor.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
LLVM_VERSION: 7.0.0
LLVM_VERSION_SHORT: 70
VS_MAJOR_VERSION: 14 # Just use LLVM built with VS 2015
USE_CMAKE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
LLVM_VERSION: 7.0.0
LLVM_VERSION_SHORT: 70
VS_MAJOR_VERSION: 14 # Just use LLVM built with VS 2015
USE_CMAKE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
LLVM_VERSION: 7.0.0
LLVM_VERSION_SHORT: 70
VS_MAJOR_VERSION: 14
USE_CMAKE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
LLVM_VERSION: 6.0.1
LLVM_VERSION_SHORT: 60
VS_MAJOR_VERSION: 14
USE_CUDA: 1
USE_CMAKE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
LLVM_VERSION: 6.0.1
LLVM_VERSION_SHORT: 60
VS_MAJOR_VERSION: 14
USE_CUDA: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
LLVM_VERSION: 5.0.2
LLVM_VERSION_SHORT: 50
VS_MAJOR_VERSION: 14
USE_CMAKE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
LLVM_VERSION: 3.5.2
LLVM_VERSION_SHORT: 35
VS_MAJOR_VERSION: 12
install:
# Hopefully temporary lines
- if /I "%LLVM_VERSION_SHORT%" LSS "40" (set BINARY_SOURCE_USER=elliottslaughter)
- if /I "%LLVM_VERSION_SHORT%" GEQ "40" (set BINARY_SOURCE_USER=Mx7f)
- appveyor DownloadFile https://github.com/%BINARY_SOURCE_USER%/llvm-package-windows/releases/download/clang-%LLVM_VERSION%-nvptx/llvm-%LLVM_VERSION%-windows-amd64-msvc%VS_MAJOR_VERSION%-msvcrt.7z
- 7z x llvm-%LLVM_VERSION%-windows-amd64-msvc%VS_MAJOR_VERSION%-msvcrt.7z
- set LLVM_DIR=%CD%\llvm-%LLVM_VERSION%-windows-amd64-msvc%VS_MAJOR_VERSION%-msvcrt
- set CLANG_RESOURCE_DIRECTORY=%LLVM_DIR%\lib\clang\%LLVM_VERSION%
- set CMAKE_PREFIX_PATH=%LLVM_DIR%
- if /I "%USE_CMAKE%" NEQ "1" (appveyor DownloadFile http://luajit.org/download/LuaJIT-2.0.5.zip)
- if /I "%USE_CMAKE%" NEQ "1" (7z x LuaJIT-2.0.5.zip)
- if /I "%USE_CMAKE%" NEQ "1" (set LUAJIT_DIR=%CD%\LuaJit-2.0.5)
- if /I "%USE_CUDA%" EQU "1" (appveyor DownloadFile https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers2/cuda_9.2.148_windows -FileName cuda.exe)
- if /I "%USE_CUDA%" EQU "1" (.\cuda -s nvcc_9.2 cudart_9.2)
- if /I "%USE_CUDA%" EQU "1" (set CUDA_DIR=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2)
- set TERRA_DIR=%CD%
- ps: git describe --tags | ForEach-Object { $_ -replace "release-", "" } | Set-Content terra_version.txt
- set /p TERRA_VERSION=<terra_version.txt
build_script:
- if /I "%USE_CMAKE%" EQU "1" (cd build)
- if /I "%USE_CMAKE%" EQU "1" (cmake .. -DCMAKE_INSTALL_PREFIX=%CD%\..\install -DCMAKE_GENERATOR_PLATFORM=x64)
- if /I "%USE_CMAKE%" EQU "1" (cmake --build . --target INSTALL --config Release)
- if /I "%USE_CMAKE%" EQU "1" (cd ..)
# There is probably a better way to do this...
- if /I "%USE_CMAKE%" NEQ "1" (if /I "%VS_MAJOR_VERSION%" EQU "14" (call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64))
- if /I "%USE_CMAKE%" NEQ "1" (if /I "%VS_MAJOR_VERSION%" EQU "12" (call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64))
- if /I "%USE_CMAKE%" NEQ "1" (cd msvc)
- if /I "%USE_CMAKE%" NEQ "1" (build %LUAJIT_DIR% %LLVM_DIR%)
- if /I "%USE_CMAKE%" NEQ "1" (cd ..)
# Package for release
- set TERRA_SHARE_PATH=%TERRA_DIR%\install\share\terra
- ps: |
If($Env:LLVM_VERSION_SHORT -eq 60 -and $Env:USE_CMAKE -eq 1) {
git ls-tree HEAD -r tests --name-only | ForEach-Object { $dir = "$Env:TERRA_SHARE_PATH\$(Split-Path -Path $_)"; If(!(Test-Path "$dir")) { New-Item -Path "$dir" -ItemType Directory }; Copy-Item $_ "$dir" }
$Env:RELEASE_NAME = "terra-Windows-x86_64-$(git rev-parse --short HEAD)"
Rename-Item install "$Env:RELEASE_NAME"
7z a "$Env:RELEASE_NAME.zip" "$Env:RELEASE_NAME"
Rename-Item "$Env:RELEASE_NAME" install
}
test_script:
- cd tests
- if /I "%USE_CMAKE%" EQU "1" (..\install\bin\terra run)
- if /I "%USE_CMAKE%" NEQ "1" (..\release\bin\terra run)
- cd ..
artifacts:
- path: 'terra-*.zip'
name: terra_release
deploy:
description: '$(APPVEYOR_REPO_TAG_NAME)'
provider: GitHub
auth_token:
secure: Ses4fC83u3cpP3EQTbkUWWiB9a4RKLErjLoR+3GzkDtPxYWKTRGAQkY80YyUgv+H
artifact: terra_release
force_update: true
on:
appveyor_repo_tag: true