kgg-dec/Jenkinsfile

64 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-10-17 00:50:14 +00:00
properties([
buildDiscarder(
logRotator(
artifactDaysToKeepStr: '',
artifactNumToKeepStr: '',
daysToKeepStr: '',
numToKeepStr: '3'
)
)
])
pipeline {
options { timestamps () }
agent {
label 'vs2022 && windows'
}
stages {
2024-11-25 21:38:47 +00:00
stage('Clean') {
steps {
dir ('build/vs2022/Release') {
deleteDir()
}
dir ('dist') {
deleteDir()
}
}
}
stage('Prepare') {
steps {
dir('third-party/sqlite3') {
sh './fetch_sqlite3.sh'
}
}
}
2024-10-17 00:50:14 +00:00
stage('Build') {
steps {
bat '''
cmake --preset vs -DCMAKE_BUILD_TYPE=Release
cmake --build --preset vs-release --config Release
copy /y README.MD .\\build\\vs2022\\Release\\
2024-11-25 21:22:45 +00:00
copy /y LICENSE .\\build\\vs2022\\Release\\
2024-10-17 00:50:14 +00:00
'''
}
}
stage('Archive') {
steps {
bat '''
2024-11-25 21:38:47 +00:00
7za a -tzip -mtm- dist/kgg-dec.zip .\\build\\vs2022\\Release\\*
2024-10-17 00:50:14 +00:00
'''
}
post {
success {
2024-11-25 21:38:47 +00:00
archiveArtifacts 'dist/*.zip'
2024-10-17 00:50:14 +00:00
}
}
}
}
}