forked from OpenAnnePro/AnnePro2-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
77 lines (70 loc) · 2.76 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
pipeline {
agent none
stages {
stage('Compile Check') {
agent {
label "linux && rust"
}
steps {
checkout scm
sh '''cargo clean'''
sh '''cargo build'''
}
}
stage("Build Release") {
parallel {
stage('Build Release Linux') {
agent {
label "linux && rust"
}
steps {
// Linux build part
checkout scm
sh '''cargo clean'''
sh '''cargo build --release'''
sh '''cp target/release/annepro2_tools target/release/annepro2_tools_linux_x64'''
}
post {
always {
archiveArtifacts artifacts: 'target/release/annepro2_tools_linux_x64', caseSensitive: false, fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
}
}
}
stage('Build Release Windows x64') {
agent {
label "win32 && rust"
}
steps {
// Linux build part
checkout scm
bat '''cargo clean'''
bat '''cargo build --release'''
bat '''ren target\\release\\annepro2_tools.exe annepro2_tools_x64.exe'''
}
post {
always {
archiveArtifacts artifacts: 'target/release/annepro2_tools_x64.exe', caseSensitive: false, fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
}
}
}
stage('Build Release Windows i386') {
agent {
label "win32 && rust"
}
steps {
// Linux build part
checkout scm
bat '''cargo clean'''
bat '''cargo build --release --target=i686-pc-windows-msvc'''
bat '''ren target\\i686-pc-windows-msvc\\release\\annepro2_tools.exe annepro2_tools_x86.exe'''
}
post {
always {
archiveArtifacts artifacts: 'target/i686-pc-windows-msvc/release/annepro2_tools_x86.exe', caseSensitive: false, fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
}
}
}
}
}
}
}