-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jenkinsfile
85 lines (83 loc) · 2.91 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
def crosscompilers = '/var/lib/jenkins/cross-compilers'
pipeline {
agent none
stages {
stage('Mac, Windows binaries') {
parallel {
stage('Win') {
agent {label 'winbuild'}
environment {
MAVEN = credentials('maven-repo')
}
steps {
bat "C:\\msys64\\usr\\bin\\env.exe MSYSTEM=CLANG64 C:\\msys64\\usr\\bin\\bash -l -c \"cd ${env.WORKSPACE.replace('\\','/').replace('C:','/c')}; bash ./recompile-msys.sh cbuild64\""
stash name: "giac-clang", includes: "cbuild*/**"
}
post {
always { deleteDir() }
}
}
stage('Mac') {
agent {label 'mac-mini'}
steps {
sh "rm src/giac/cpp/kdisplay.cc"
sh "export ANDROID_SDK_ROOT=~/.android-sdk/; ./gradlew javagiacOsx_amd64SharedLibrary javagiacOsx_arm64SharedLibrary --info"
stash name: 'giac-mac', includes: 'build/binaries/javagiacSharedLibrary/osx_x86-64/libjavagiac.jnilib'
stash name: 'giac-mac-arm64', includes: 'build/binaries/javagiacSharedLibrary/osx_arm-v8/libjavagiac.jnilib'
}
post {
always { deleteDir() }
}
}
}
}
stage('Build') {
parallel {
stage('Java and JS') {
agent {label 'deploy2'}
environment {
MAVEN = credentials('maven-repo')
ANDROID_SDK_ROOT='/var/lib/jenkins/.android-sdk'
BINARYEN="${env.WORKSPACE}/emsdk/upstream"
EMSDK_PYTHON='/usr/bin/python3.10'
PATH="$crosscompilers/x86/bin:$crosscompilers/x86_64/bin:$crosscompilers/arm/bin:$crosscompilers/arm64/bin:/var/lib/jenkins/glibc/build/elf:$PATH"
}
steps {
unstash name: 'giac-clang'
unstash name: 'giac-mac'
unstash name: 'giac-mac-arm64'
sh "rm src/giac/cpp/kdisplay.cc"
sh '''
export SVN_REVISION=`git log -1 | grep "\\S" | tail -n 1 | sed "s/.*@\\([0-9]*\\).*/\\1/"`
./gradlew downloadEmsdk installEmsdk activateEmsdk
./gradlew :emccClean :giac-gwt:publish --no-daemon -Prevision=$SVN_REVISION --refresh-dependencies
./gradlew :updateGiac --no-daemon -Prevision=$SVN_REVISION --info'''
}
post {
always { deleteDir() }
}
}
stage('Objective C') {
agent {label 'mac-mini'}
environment {
MAVEN = credentials('maven-repo')
}
steps {
sh "rm src/giac/cpp/kdisplay.cc"
sh '''
export SVN_REVISION=`git log -1 | grep "\\S" | tail -n 1 | sed "s/.*@\\([0-9]*\\).*/\\1/"`
./gradlew clean publishPodspec -Prevision=$SVN_REVISION'''
}
post {
always { deleteDir() }
}
}
}
}
}
post {
always {
cleanAndNotify("#giac")
}
}
}