From 656ce44fa83df00bb2962bad9d49795846c9546a Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 19 Sep 2025 16:19:58 +0200 Subject: [PATCH] Gitea CI: Upload packages --- .gitea/workflows/build_and_test.yml | 62 ++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index 5e666247..a3b396d0 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -45,17 +45,61 @@ jobs: cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_flags }} .. ninja frontend ninja -j16 package - shopt -s nullglob - files=( *.rpm *.deb ) - if (( ${#files[@]} )); then - mv "${files[@]}" .. - else - echo "No packages found to move" - fi - - name: Upload documentation + - name: Upload packages if: github.ref_type == 'tag' shell: bash - run: pwd + run: | + cd build + if [ "${{ matrix.distro }}" = "rocky8" ]; then + for file in *.rpm; do + if [ -f "$file" ]; then + curl --user __token__:${{ secrets.PIP_REPOSITORY_API_TOKEN }} \ + --upload-file "$file" \ + https://gitea.psi.ch/api/packages/mx/rpm/centos/el8/cuda12/upload + fi + done + elif [ "${{ matrix.distro }}" = "rocky9" ]; then + for file in *.rpm; do + if [ -f "$file" ]; then + curl --user __token__:${{ secrets.PIP_REPOSITORY_API_TOKEN }} \ + --upload-file "$file" \ + https://gitea.psi.ch/api/packages/mx/rpm/centos/el9/cuda13/upload + fi + done + elif [ "${{ matrix.distro }}" = "rocky8_nocuda" ]; then + for file in *.rpm; do + if [ -f "$file" ]; then + curl --user __token__:${{ secrets.PIP_REPOSITORY_API_TOKEN }} \ + --upload-file "$file" \ + https://gitea.psi.ch/api/packages/mx/rpm/centos/el8/nocuda/upload + fi + done + elif [ "${{ matrix.distro }}" = "rocky8_sls9" ]; then + for file in *.rpm; do + if [ -f "$file" ]; then + curl --user __token__:${{ secrets.PIP_REPOSITORY_API_TOKEN }} \ + --upload-file "$file" \ + https://gitea.psi.ch/api/packages/mx/rpm/centos/el8/cuda12-sls9/upload + fi + done + elif [ "${{ matrix.distro }}" = "ubuntu2204" ]; then + for file in *.deb; do + if [ -f "$file" ]; then + curl --user __token__:${{ secrets.PIP_REPOSITORY_API_TOKEN }} \ + --upload-file "$file" \ + https://gitea.psi.ch/api/packages/mx/debian/pool/jammy/cuda13/upload + fi + done + elif [ "${{ matrix.distro }}" = "ubuntu2404" ]; then + for file in *.deb; do + if [ -f "$file" ]; then + curl --user __token__:${{ secrets.PIP_REPOSITORY_API_TOKEN }} \ + --upload-file "$file" \ + https://gitea.psi.ch/api/packages/mx/debian/pool/noble/cuda13/upload + fi + done + fi + python-client: name: Generate python client runs-on: jfjoch_rocky8