diff --git a/custom-jobs/current-jobs.json b/custom-jobs/current-jobs.json index 6232c8c..eb10604 100644 --- a/custom-jobs/current-jobs.json +++ b/custom-jobs/current-jobs.json @@ -1,23 +1,24 @@ [ {"name": "Krita_Utilities_Setup", "pipeline": "krita/Krita_Utilities_Setup.pipeline", "cron": ""}, {"name": "Krita_Nightly_Appimage_Build", "pipeline": "krita/Krita_Nightly_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Nightly_Windows_Build", "pipeline": "krita/Krita_Nightly_Windows_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Nightly_MacOS_Build", "pipeline": "krita/Krita_Nightly_MacOS_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Stable_Appimage_Build", "pipeline": "krita/Krita_Stable_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Stable_Windows_Build", "pipeline": "krita/Krita_Stable_Windows_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Nightly_Windows_Dependency_Build", "pipeline": "krita/Krita_Nightly_Windows_Dependency_Build.pipeline", "cron": ""}, {"name": "Krita_Nightly_Appimage_Dependency_Build", "pipeline": "krita/Krita_Nightly_Appimage_Dependency_Build.pipeline", "cron": ""}, {"name": "Krita_Nightly_MacOS_Dependency_Build", "pipeline": "krita/Krita_Nightly_MacOS_Dependency_Build.pipeline", "cron": ""}, + {"name": "Krita_Nightly_Android_Dependency_Build", "pipeline": "krita/Krita_Nightly_Android_Dependency_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Appimage_Build", "pipeline": "krita/Krita_Release_Appimage_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Windows64_Build", "pipeline": "krita/Krita_Release_Windows64_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Windows32_Build", "pipeline": "krita/Krita_Release_Windows32_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Windows32_Dependency_Build", "pipeline": "krita/Krita_Release_Windows32_Dependency_Build.pipeline", "cron": ""}, {"name": "KMyMoney_Nightly_Appimage_Build", "pipeline": "kmymoney/KMyMoney_Nightly_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "KMyMoney_Nightly_Appimage_Dependency_Build", "pipeline": "kmymoney/KMyMoney_Nightly_Appimage_Dependency_Build.pipeline", "cron": ""}, {"name": "KMyMoney_Release_Appimage_Build", "pipeline": "kmymoney/KMyMoney_Release_Appimage_Build.pipeline", "cron": ""}, {"name": "KMyMoney_Stable_Appimage_Build", "pipeline": "kmymoney/KMyMoney_Stable_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "Kdenlive_Nightly_Appimage_Build", "pipeline": "kdenlive/Kdenlive_Nightly_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "Kdenlive_Nightly_Appimage_Dependency_Build", "pipeline": "kdenlive/Kdenlive_Nightly_Appimage_Dependency_Build.pipeline", "cron": ""} ] diff --git a/custom-jobs/krita/Krita_Nightly_Android_Dependency_Build.pipeline b/custom-jobs/krita/Krita_Nightly_Android_Dependency_Build.pipeline new file mode 100644 index 0000000..87fe4b7 --- /dev/null +++ b/custom-jobs/krita/Krita_Nightly_Android_Dependency_Build.pipeline @@ -0,0 +1,62 @@ +// Request a node to be allocated to us +node( "AndroidAArch64SDK" ) { +// We want Timestamps on everything +timestamps { + // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed + catchError { + + // First Thing: Checkout Sources + stage('Checkout Sources') { + // Make sure we have a clean slate to begin with + deleteDir() + + // Krita Code + checkout changelog: true, poll: true, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'krita/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/krita']] + ] + + } + + // Make sure the Android SDK is setup properly + stage('Setting up SDK') { + // For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail + sh """ + sdkmanager "platforms;android-28" + """ + } + + // Now we can build the Dependencies for Krita's build + stage('Building Dependencies') { + // This is relatively straight forward + // For this we do need to unset QT_ANDROID though, to ensure it builds it's own patched version rather than using the normal one we rely on elsewhere + // Then we invoke them! + sh """ + unset QT_ANDROID + + export ANDROID_ABI=arm64-v8a + export ANDROID_API_LEVEL=28 + export CMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT + + krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=boost + krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=qt + krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=3rdparty + krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=kf5 + """ + } + + // Now we capture them for use + stage('Capturing Dependencies') { + // First we tar all of the dependencies up... + sh """ + tar -cf $WORKSPACE/krita-android-deps.tar build/i/ build/kf5/kde/install/ + """ + + // Then we ask Jenkins to capture the tar file as an artifact + archiveArtifacts artifacts: 'krita-android-deps.tar', onlyIfSuccessful: true + } + } +} +}