Compare commits
10 Commits
460c04d950
...
b27ceb360b
Author | SHA1 | Date | |
---|---|---|---|
b27ceb360b | |||
|
a7fd985ad6 | ||
|
660b36fe8d | ||
|
acccdb7414 | ||
|
42e5cad4f0 | ||
|
9205caa327 | ||
|
aa14c3c27b | ||
|
2f47001970 | ||
|
74c72f8f75 | ||
|
f7a8c5dcf1 |
18
.SRCINFO
18
.SRCINFO
@ -1,20 +1,24 @@
|
||||
pkgbase = ncnn-git
|
||||
pkgdesc = High-performance neural network inference framework optimized for the mobile platform
|
||||
pkgver = 20210322.r16.gcc8e7a13
|
||||
pkgrel = 3
|
||||
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
|
||||
makedepends = vulkan-icd-loader
|
||||
makedepends = protobuf
|
||||
makedepends = vulkan-headers
|
||||
depends = glslang
|
||||
optdepends = protobuf: for onnx2ncnn
|
||||
provides = ncnn
|
||||
conflicts = ncnn
|
||||
source = git://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/Tencent/ncnn.git
|
||||
source = git+https://github.com/KhronosGroup/glslang
|
||||
source = git+https://github.com/pybind/pybind11
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = ncnn-git
|
||||
|
||||
|
45
Jenkinsfile
vendored
Normal file
45
Jenkinsfile
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
55
PKGBUILD
55
PKGBUILD
@ -4,19 +4,21 @@
|
||||
|
||||
pkgname=ncnn-git
|
||||
_pkgname=ncnn
|
||||
pkgver=20210322.r16.gcc8e7a13
|
||||
pkgrel=3
|
||||
pkgver=20231027.r9.g31e315981
|
||||
pkgrel=1
|
||||
pkgdesc="High-performance neural network inference framework optimized for the mobile platform"
|
||||
url="https://github.com/Tencent/ncnn"
|
||||
license=('BSD')
|
||||
depends=()
|
||||
makedepends=('git' 'cmake' 'vulkan-icd-loader')
|
||||
depends=('glslang')
|
||||
makedepends=('git' 'cmake' 'vulkan-icd-loader' 'protobuf' 'vulkan-headers')
|
||||
optdepends=('protobuf: for onnx2ncnn')
|
||||
conflicts=('ncnn')
|
||||
provides=('ncnn')
|
||||
arch=('i686' 'x86_64')
|
||||
source=("git://github.com/Tencent/ncnn.git"
|
||||
"vulkansdk-linux-x86_64-latest.tar.gz::https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.exe")
|
||||
sha256sums=('SKIP' 'SKIP')
|
||||
arch=('aarch64')
|
||||
source=("git+https://github.com/Tencent/ncnn.git"
|
||||
"git+https://github.com/KhronosGroup/glslang"
|
||||
"git+https://github.com/pybind/pybind11")
|
||||
sha256sums=('SKIP' 'SKIP' 'SKIP')
|
||||
pkgver() {
|
||||
cd "${srcdir}/ncnn"
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
@ -24,34 +26,35 @@ pkgver() {
|
||||
|
||||
prepare() {
|
||||
|
||||
mv $srcdir/1.* $srcdir/latest
|
||||
export VULKAN_SDK=$srcdir/latest/x86_64
|
||||
cd "${srcdir}/ncnn"
|
||||
|
||||
# init glslang submodule
|
||||
git submodule update --init --recursive
|
||||
|
||||
# fix for system glslang
|
||||
# sed -i'' 's|#include "glslang/glslang|#include "glslang|' ./src/gpu.cpp
|
||||
# init submodules
|
||||
git submodule init
|
||||
git config submodule.glslang.url "$srcdir/glslang"
|
||||
git config submodule.python/pybind11.url "$srcdir/pybind11"
|
||||
git -c protocol.file.allow=always submodule update
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/ncnn"
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
cd "${srcdir}"
|
||||
cmake -S $_pkgname -B build \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE='Release' \
|
||||
-DNCNN_BUILD_EXAMPLES=OFF \
|
||||
-DNCNN_VULKAN=ON \
|
||||
..
|
||||
make
|
||||
-DNCNN_SYSTEM_GLSLANG=ON \
|
||||
-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() {
|
||||
cd "${srcdir}/ncnn/build"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
cd "${srcdir}"
|
||||
DESTDIR="${pkgdir}" cmake --install build
|
||||
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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user