forked from taichi-dev/taichi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
103 lines (102 loc) · 3.15 KB
/
Jenkinsfile
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
pipeline {
agent any
environment {
PYPI_PWD = credentials('PYPI_PWD')
PATH = "/usr/local/clang-7.0.1/bin:/usr/local/cuda/bin/:$PATH"
LD_LIBRARY_PATH = "/usr/local/clang-7.0.1/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
CC = "clang-7"
CXX = "clang++"
}
stages{
stage('Build') {
parallel {
stage('cuda10.0-python3.6') {
agent {
node {
label "cuda10_0 && python3_6"
customWorkspace "taichi_cu100_py36"
}
}
environment {
PYTHON_EXECUTABLE = "python3.6"
CUDA_VERSION = "10.0"
}
steps{
build_taichi()
}
}
stage('cuda10.0-python3.7') {
agent {
node {
label "cuda10_0 && python3_7"
customWorkspace "taichi_cu100_py37"
}
}
environment {
PYTHON_EXECUTABLE = "python3.7"
CUDA_VERSION = "10.0"
}
steps{
build_taichi()
}
}
stage('cuda10.0-python3.8') {
agent {
node {
label "cuda10_0 && python3_8"
customWorkspace "taichi_cu100_py38"
}
}
environment {
PYTHON_EXECUTABLE = "python3.8"
CUDA_VERSION = "10.0"
}
steps{
build_taichi()
}
}
}
}
stage('Test') {
steps {
sh "echo Testing"
}
}
stage('Release') {
steps {
sh "echo releasing"
}
}
}
}
void build_taichi() {
sh "echo building"
sh "echo $PATH"
git 'https://github.com/taichi-dev/taichi.git'
sh label: '', script: '''
echo $PATH
echo $CC
echo $CXX
$CC --version
$CXX --version
echo $WORKSPACE
$PYTHON_EXECUTABLE -m pip install twine numpy Pillow scipy pybind11 colorama setuptools astor matplotlib pytest autograd GitPython dill --user
export TAICHI_REPO_DIR=$WORKSPACE/
echo $TAICHI_REPO_DIR
export PYTHONPATH=$TAICHI_REPO_DIR/python
export PATH=$WORKSPACE/bin/:$PATH
nvidia-smi
cd $TAICHI_REPO_DIR
git submodule update --init --recursive
[ -e build ] && rm -rf build
mkdir build && cd build
export CUDA_BIN_PATH=/usr/local/cuda-${CUDA_VERSION}
cmake .. -DPYTHON_EXECUTABLE=$PYTHON_EXECUTABLE -DCUDA_VERSION=$CUDA_VERSION
make -j 8
ldd libtaichi_core.so
objdump -T libtaichi_core.so| grep GLIBC
cd ../python
ti test -t 1 -na opengl
$PYTHON_EXECUTABLE build.py upload
'''
}