From 765969346339037ca4ec2928547abf492569aa1e Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Thu, 8 May 2025 14:43:45 -0500 Subject: [PATCH] Pack for all arches --- .onedev-buildspec.yml | 25 +++---------------------- Dockerfile.run | 4 +++- packaging/arch-ppc.txt | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 packaging/arch-ppc.txt diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 9b49279..592da96 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -1,6 +1,6 @@ -version: 38 +version: 39 jobs: -- name: Build for x86_64 +- name: Build steps: - !CheckoutStep name: Checkout @@ -8,25 +8,6 @@ jobs: withLfs: true withSubmodules: false condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - - !CommandStep - name: Execute build - runInContainer: true - image: onedev.site.tesses.net/dependencies/dependencies:latest - interpreter: !DefaultInterpreter - commands: | - mkdir build - cd build - cmake -S .. -B . -DCMAKE_INSTALL_PREFIX=/usr - make -j12 - make install DESTDIR=out - cpack -G DEB - curl --user $GITEA_USERPASS -X DELETE https://gitea-pkg.site.tesses.net/api/packages/tesses50/debian/pool/noble/main/tessesframework/1.0.0/amd64 || true - curl --user $GITEA_USERPASS --upload-file TessesFramework-1.0.0-Linux.deb https://gitea-pkg.site.tesses.net/api/packages/tesses50/debian/pool/noble/main/upload - envVars: - - name: GITEA_USERPASS - value: '@secret:GITEA_USERPASS@' - useTTY: true - condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - !BuildImageStep name: Build Docker Image dockerfile: Dockerfile.run @@ -36,7 +17,7 @@ jobs: - registryUrl: '@server_url@' userName: '@job_token@' passwordSecret: dockersecret - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL triggers: - !BranchUpdateTrigger diff --git a/Dockerfile.run b/Dockerfile.run index 9263f16..e1c9489 100644 --- a/Dockerfile.run +++ b/Dockerfile.run @@ -1,3 +1,5 @@ FROM onedev.site.tesses.net/dependencies/dependencies:latest -COPY build/out / +COPY . /usr/src +WORKDIR /usr/src +RUN mkdir build && cd build && cmake -S .. -B . -DCMAKE_INSTALL_PREFIX=/usr && make -j12 && make install && cpack -G DEB && curl --user $GITEA_USERPASS --upload-file TessesFramework-1.0.0-Linux.deb https://gitea-pkg.site.tesses.net/api/packages/tesses50/debian/pool/noble/main/upload ; true && cd .. && rm -rf build diff --git a/packaging/arch-ppc.txt b/packaging/arch-ppc.txt new file mode 100644 index 0000000..52ae5af --- /dev/null +++ b/packaging/arch-ppc.txt @@ -0,0 +1,39 @@ +# Maintainer: Mike Nolan +pkgname=tesses-framework +pkgver=1.0.0 +pkgrel=1 +pkgdesc="A C++ Cross Platform Framework used by crosslang" +arch=("powerpc") +url="https://tesses.net/apps/tesses-framework" +license=('MIT') +groups=() +depends=("mbedtls") +makedepends=("git" "cmake" "make" "gcc") +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +changelog= +source=("tesses-framework::git+https://onedev.site.tesses.net/tesses-framework") +sha256sums=("SKIP") +pkgver() { + cd "$pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} +build() { + cd "$pkgname" + mkdir -p build + cd build + cmake -S .. -B . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release + make -j12 +} + + +package() { + cd "$pkgname/build" + make DESTDIR="$pkgdir/" install +} \ No newline at end of file