From b27ceb360bceb608ecf8bc507fb3d5af0356af54 Mon Sep 17 00:00:00 2001 From: Molly Sophia Date: Thu, 21 Dec 2023 14:43:57 +0800 Subject: [PATCH] Add Jenkinsfile Signed-off-by: Molly Sophia --- .SRCINFO | 3 +-- Jenkinsfile | 45 +++++++++++++++++++++++++++++++++++++++++++++ PKGBUILD | 2 +- 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 Jenkinsfile diff --git a/.SRCINFO b/.SRCINFO index 52adc49..d2a9b10 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -3,8 +3,7 @@ pkgbase = ncnn-git pkgver = 20231027.r9.g31e315981 pkgrel = 1 url = https://github.com/Tencent/ncnn - arch = i686 - arch = x86_64 + arch = aarch64 license = BSD makedepends = git makedepends = cmake diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..782aa92 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,45 @@ +pipeline { + agent { + label 'aarch64 && archlinux' + } + stages { + stage('Download Config') { + steps { + dir('jenkins-utils') { + git 'https://gitlab.classfun.cn:4443/renegade-project/jenkins-utils' + } + } + } + stage('Cleanup packages') { + steps { + sh 'rm -f *.pkg.tar.*' + } + } + stage('Build') { + steps { + sh 'sudo pacman -Syy' + sh 'makepkg --config jenkins-utils/makepkg-aarch64.conf --syncdeps --force --noconfirm' + } + } + stage('Signature packages') { + steps { + withCredentials([ + file(credentialsId: 'gpg-file', variable: 'GPG_FILE'), + string(credentialsId: 'gpg-secret', variable: 'GPG_SECRET') + ]) { + sh 'python3 jenkins-utils/sign-pkg.py -d . -k "$GPG_FILE" -p "$GPG_SECRET"' + } + } + } + stage('Upload packages') { + steps { + sh 'python3 jenkins-utils/upload-pkg.py -d . -a aarch64' + } + } + stage('Archive') { + steps { + archiveArtifacts artifacts: '*.pkg.tar.*', fingerprint: true + } + } + } +} diff --git a/PKGBUILD b/PKGBUILD index d3d27a3..5bf702f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -14,7 +14,7 @@ makedepends=('git' 'cmake' 'vulkan-icd-loader' 'protobuf' 'vulkan-headers') optdepends=('protobuf: for onnx2ncnn') conflicts=('ncnn') provides=('ncnn') -arch=('i686' 'x86_64') +arch=('aarch64') source=("git+https://github.com/Tencent/ncnn.git" "git+https://github.com/KhronosGroup/glslang" "git+https://github.com/pybind/pybind11")