summaryrefslogtreecommitdiff
path: root/contrib/depends/Jenkinsfile
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2025-07-09 23:52:19 +0200
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2025-07-09 23:52:19 +0200
commit97bd91caf41178d28846b4cb6755777bb21a17dc (patch)
tree7e9945cd47fd281c181af2aabc91ab56d44832a9 /contrib/depends/Jenkinsfile
parenta27fbcb24d91143715ed930a05aaa4d853fba1f2 (diff)
feat: jenkins CI initial
Diffstat (limited to 'contrib/depends/Jenkinsfile')
-rw-r--r--contrib/depends/Jenkinsfile94
1 files changed, 94 insertions, 0 deletions
diff --git a/contrib/depends/Jenkinsfile b/contrib/depends/Jenkinsfile
new file mode 100644
index 0000000..91313e8
--- /dev/null
+++ b/contrib/depends/Jenkinsfile
@@ -0,0 +1,94 @@
+pipeline {
+ agent none
+
+ parameters {
+ string(
+ name: 'LINUX_TARGETS',
+ defaultValue: 'x86_64-linux-android,armv7a-linux-androideabi,aarch64-linux-android,x86_64-linux-gnu,aarch64-linux-gnu,i686-linux-gnu,x86_64-w64-mingw32,i686-w64-mingw32',
+ description: 'Comma-separated list of Linux targets to build'
+ )
+ string(
+ name: 'DARWIN_TARGETS',
+ defaultValue: 'aarch64-apple-darwin,x86_64-apple-darwin,aarch64-apple-ios,aarch64-apple-iossimulator',
+ description: 'Comma-separated list of Darwin targets to build'
+ )
+ }
+
+ stages {
+ stage('Build Dependencies') {
+ parallel {
+ stage('Linux Builds') {
+ agent {
+ dockerfile {
+ filename '.devcontainer/Dockerfile'
+ args '-v /opt/builds:/opt/builds'
+ label 'linux && amd64'
+ }
+ }
+ steps {
+ script {
+ def targets = params.LINUX_TARGETS.split(',').collect { it.trim() }
+
+ checkout scm
+
+ for (target in targets) {
+ echo "Building dependencies for ${target}"
+
+ dir('contrib/depends') {
+ sh "make HOST=${target}"
+ }
+ }
+ }
+ }
+ post {
+ always {
+ script {
+ def targets = params.LINUX_TARGETS.split(',').collect { it.trim() }
+ for (target in targets) {
+ archiveArtifacts artifacts: "contrib/depends/built/${target}/*/*.tar.gz*", allowEmptyArchive: true
+ }
+ }
+ }
+ }
+ }
+
+ stage('Darwin Builds') {
+ agent {
+ label 'darwin && arm64'
+ }
+ steps {
+ script {
+ def targets = params.DARWIN_TARGETS.split(',').collect { it.trim() }
+
+ checkout scm
+
+ for (target in targets) {
+ echo "Building dependencies for ${target}"
+
+ dir('contrib/depends') {
+ sh "make HOST=${target}"
+ }
+ }
+ }
+ }
+ post {
+ always {
+ script {
+ def targets = params.DARWIN_TARGETS.split(',').collect { it.trim() }
+ for (target in targets) {
+ archiveArtifacts artifacts: "contrib/depends/built/${target}/*/*.tar.gz*", allowEmptyArchive: true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ post {
+ always {
+ echo "Build completed."
+ }
+ }
+} \ No newline at end of file