From 97bd91caf41178d28846b4cb6755777bb21a17dc Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Wed, 9 Jul 2025 23:52:19 +0200 Subject: feat: jenkins CI initial --- contrib/depends/Jenkinsfile | 94 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 contrib/depends/Jenkinsfile (limited to 'contrib/depends/Jenkinsfile') 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 -- cgit v1.2.3