This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
forked from terralang/terra
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
82 lines (72 loc) · 2.9 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
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
- 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
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
LLVM_VERSION: 7.0.0
LLVM_VERSION_SHORT: 70
VS_MAJOR_VERSION: 14
- 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: 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
install:
# Hopefully temporary lines
- 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_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:
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=%CD%\..\install -DCMAKE_GENERATOR_PLATFORM=x64
- cmake --build . --target INSTALL --config Release
- cd ..
# Package for release
- set TERRA_SHARE_PATH=%TERRA_DIR%\install\share\terra
- ps: |
If($Env:LLVM_VERSION_SHORT -eq 60) {
$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
- ..\install\bin\terra run
- cd ..
artifacts:
- path: 'terra-*.zip'
name: terra_release
deploy:
description: '$(APPVEYOR_REPO_TAG_NAME)'
provider: GitHub
auth_token:
secure: yN5vuhZjUW+MkntZ51StgL0qmgfjXbY8k6QlAyy/rxMV1YcRxmN2fO8KQxOefEhA
artifact: terra_release
force_update: true
on:
appveyor_repo_tag: true