SimpleHelperTools/Jenkinsfile
2024-08-30 21:10:07 -07:00

75 lines
No EOL
2 KiB
Groovy

pipeline {
agent any
stages {
stage("Build on Linux") {
agent {
label 'linux'
}
steps {
sh '''
#!/bin/bash
./compile.sh
'''
}
post {
always {
archiveArtifacts artifacts: "dart/out/*", fingerprint: true
archiveArtifacts artifacts: "cpp/build/vsleep", fingerprint: true
archiveArtifacts artifacts: "cpp/build/pause", fingerprint: true
deleteDir()
}
}
}
stage("Build on Windows") {
agent {
label 'windows'
}
steps {
bat '''
@echo off
git clean -xfd
git reset --hard
mkdir cpp\\build
cd cpp\\build
cmake ..
make
cd ..\\..
cd dart
dart pub get
mkdir out
dart compile exe -o out\\dbikc.exe bin\\dbikc.dart
dart compile exe -o out\\uuidgen.exe bin\\uuidgen.dart
dart compile exe -o out\\mkfsreport.exe bin\\mkfsreport.dart
dart compile exe -o out\\nbt2snbt.exe bin\\nbt2snbt.dart
dart compile exe -o out\\snbt2nbt.exe bin\\snbt2nbt.dart
dart compile exe -o out\\pause.exe bin\\pause.dart
cd ..
'''
}
post {
always {
archiveArtifacts artifacts: "dart\\out\\*.exe", fingerprint: true
archiveArtifacts artifacts: "cpp\\build\\vsleep.exe", fingerprint: true
archiveArtifacts artifacts: "cpp\\build\\pause.exe", fingerprint: true
deleteDir()
}
}
}
}
}