LibAC-dart/Jenkinsfile

72 lines
1.8 KiB
Groovy

pipeline {
agent any
options {
buildDiscarder(
logRotator(
numToKeepStr: '5'
)
)
}
stages {
stage('Build on linux') {
agent {
label 'linux'
}
steps {
script {
// Use bash as the shell for these commands
sh '''
#!/bin/bash
unset WORKSPACE
unset WORKSPACE_TMP
rm -rf doc
dart pub get
dart doc
mkdir -p out
dart compile exe -o out/dbikc bin/dbikc.dart
dart compile exe -o out/mkfsreport bin/mkfsreport.dart
tar -cvf docs.tgz doc/api/*
flutter pub publish -f --skip-validation
'''
}
}
post {
always {
archiveArtifacts artifacts: "*.tgz", fingerprint: true
archiveArtifacts artifacts: "out/*", fingerprint: true
deleteDir()
}
}
}
stage('Build on Windows') {
agent {
label 'windows'
}
steps {
script {
bat "dart pub get"
bat "mkdir out"
bat "dart compile exe -o out/dbikc.exe bin/dbikc.dart"
bat "dart compile exe -o out/mkfsreport.exe bin/mkfsreport.dart"
}
}
post {
always {
archiveArtifacts artifacts: "out\\*.exe", fingerprint: true
deleteDir()
}
}
}
}
}