Compare commits

...

10 Commits

Author SHA1 Message Date
b27ceb360b Add Jenkinsfile
Some checks failed
gitea/pkg-ncnn-git/pipeline/head There was a failure building this commit
Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
2023-12-21 14:43:57 +08:00
HurricanePootis
a7fd985ad6 Make submodule cloning more like wiki 2023-11-07 13:34:34 -06:00
HurricanePootis
660b36fe8d Forgot the .srcinfo 2023-02-23 01:47:43 -06:00
HurricanePootis
acccdb7414 Improve cmake style 2023-02-23 01:47:10 -06:00
HurricanePootis
42e5cad4f0 Update git module method 2022-10-19 15:46:06 -05:00
HurricanePootis
9205caa327 Forgot the .SRCINFO lol 2022-07-25 17:17:09 -05:00
HurricanePootis
aa14c3c27b Enable building of tools 2022-07-25 17:15:26 -05:00
HurricanePootis
2f47001970 Update PKGBUILD to be more inline with community/ncnn 2022-07-21 12:11:56 -05:00
HurricanePootis
74c72f8f75 Update to include vulkan-headers 2022-04-11 08:58:46 -05:00
HurricanePootis
f7a8c5dcf1 Update to git submodule in source(), and use system glslang 2022-03-24 11:17:22 -05:00
3 changed files with 85 additions and 33 deletions

View File

@ -1,20 +1,24 @@
pkgbase = ncnn-git pkgbase = ncnn-git
pkgdesc = High-performance neural network inference framework optimized for the mobile platform pkgdesc = High-performance neural network inference framework optimized for the mobile platform
pkgver = 20210322.r16.gcc8e7a13 pkgver = 20231027.r9.g31e315981
pkgrel = 3 pkgrel = 1
url = https://github.com/Tencent/ncnn url = https://github.com/Tencent/ncnn
arch = i686 arch = aarch64
arch = x86_64
license = BSD license = BSD
makedepends = git makedepends = git
makedepends = cmake makedepends = cmake
makedepends = vulkan-icd-loader makedepends = vulkan-icd-loader
makedepends = protobuf
makedepends = vulkan-headers
depends = glslang
optdepends = protobuf: for onnx2ncnn
provides = ncnn provides = ncnn
conflicts = ncnn conflicts = ncnn
source = git://github.com/Tencent/ncnn.git source = git+https://github.com/Tencent/ncnn.git
source = vulkansdk-linux-x86_64-latest.tar.gz::https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.exe source = git+https://github.com/KhronosGroup/glslang
source = git+https://github.com/pybind/pybind11
sha256sums = SKIP
sha256sums = SKIP sha256sums = SKIP
sha256sums = SKIP sha256sums = SKIP
pkgname = ncnn-git pkgname = ncnn-git

45
Jenkinsfile vendored Normal file
View File

@ -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
}
}
}
}

View File

@ -4,19 +4,21 @@
pkgname=ncnn-git pkgname=ncnn-git
_pkgname=ncnn _pkgname=ncnn
pkgver=20210322.r16.gcc8e7a13 pkgver=20231027.r9.g31e315981
pkgrel=3 pkgrel=1
pkgdesc="High-performance neural network inference framework optimized for the mobile platform" pkgdesc="High-performance neural network inference framework optimized for the mobile platform"
url="https://github.com/Tencent/ncnn" url="https://github.com/Tencent/ncnn"
license=('BSD') license=('BSD')
depends=() depends=('glslang')
makedepends=('git' 'cmake' 'vulkan-icd-loader') makedepends=('git' 'cmake' 'vulkan-icd-loader' 'protobuf' 'vulkan-headers')
optdepends=('protobuf: for onnx2ncnn')
conflicts=('ncnn') conflicts=('ncnn')
provides=('ncnn') provides=('ncnn')
arch=('i686' 'x86_64') arch=('aarch64')
source=("git://github.com/Tencent/ncnn.git" source=("git+https://github.com/Tencent/ncnn.git"
"vulkansdk-linux-x86_64-latest.tar.gz::https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.exe") "git+https://github.com/KhronosGroup/glslang"
sha256sums=('SKIP' 'SKIP') "git+https://github.com/pybind/pybind11")
sha256sums=('SKIP' 'SKIP' 'SKIP')
pkgver() { pkgver() {
cd "${srcdir}/ncnn" cd "${srcdir}/ncnn"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
@ -24,34 +26,35 @@ pkgver() {
prepare() { prepare() {
mv $srcdir/1.* $srcdir/latest
export VULKAN_SDK=$srcdir/latest/x86_64
cd "${srcdir}/ncnn" cd "${srcdir}/ncnn"
# init glslang submodule # init submodules
git submodule update --init --recursive git submodule init
git config submodule.glslang.url "$srcdir/glslang"
# fix for system glslang git config submodule.python/pybind11.url "$srcdir/pybind11"
# sed -i'' 's|#include "glslang/glslang|#include "glslang|' ./src/gpu.cpp git -c protocol.file.allow=always submodule update
} }
build() { build() {
cd "${srcdir}/ncnn" cd "${srcdir}"
mkdir -p build cmake -S $_pkgname -B build \
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE='Release' \
-DNCNN_BUILD_EXAMPLES=OFF \ -DNCNN_BUILD_EXAMPLES=OFF \
-DNCNN_VULKAN=ON \ -DNCNN_VULKAN=ON \
.. -DNCNN_SYSTEM_GLSLANG=ON \
make -DNCNN_SHARED_LIB=ON \
-DNCNN_ENABLE_LTO=ON \
-DNCNN_STDIO=ON \
-DNCNN_STRING=ON \
-DNCNN_BUILD_TOOLS=1 \
-DGLSLANG_TARGET_DIR=/usr/lib/cmake \
-Wno-dev
cmake --build build
} }
package() { package() {
cd "${srcdir}/ncnn/build" cd "${srcdir}"
make DESTDIR="${pkgdir}" install DESTDIR="${pkgdir}" cmake --install build
install -Dm644 "${srcdir}/ncnn/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 "${srcdir}/ncnn/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
rm -rf "$pkgdir/usr/include/glslang"
rm -rf "$pkgdir/usr/lib/cmake/OGLCompilerTargets-release.cmake" "$pkgdir/usr/lib/cmake/OGLCompilerTargets.cmake" "$pkgdir/usr/lib/cmake/OSDependentTargets-release.cmake" "$pkgdir/usr/lib/cmake/OSDependentTargets.cmake" "$pkgdir/usr/lib/cmake/SPIRVTargets-release.cmake" "$pkgdir/usr/lib/cmake/SPIRVTargets.cmake" "$pkgdir/usr/lib/cmake/glslangTargets-release.cmake" "$pkgdir/usr/lib/cmake/glslangTargets.cmake"
rm -rf "$pkgdir/usr/lib/libGenericCodeGen.a" "$pkgdir/usr/lib/libMachineIndependent.a" "$pkgdir/usr/lib/libOGLCompiler.a" "$pkgdir/usr/lib/libOSDependent.a" "$pkgdir/usr/lib/libSPIRV.a" "$pkgdir/usr/lib/libglslang.a"
} }