1010 tags : ['v*']
1111 pull_request :
1212 workflow_dispatch :
13- inputs :
14- release_to_maven_central :
15- description : ' Release to Maven Central (true/false)'
16- required : false
17- default : ' false'
18- enable_cuda_build :
19- description : ' Compile CUDA artifacts (slow — nvcc install + build). Auto-enabled on tag pushes.'
20- required : false
21- default : ' false'
2213env :
2314 JAVA_VERSION : ' 21'
2415 MODEL_URL : " https://huggingface.co/TheBloke/CodeLlama-7B-GGUF/resolve/main/codellama-7b.Q2_K.gguf"
5445 name : Cross-Compile manylinux_2_28 x86_64 (CUDA)
5546 needs : startgate
5647 runs-on : ubuntu-latest
57- outputs :
58- built : ${{ steps.build.outputs.built }}
5948 steps :
6049 - uses : actions/checkout@v6
6150 - name : Display CPU Info
@@ -67,18 +56,10 @@ jobs:
6756 echo "=== CPU Details from /proc/cpuinfo ==="
6857 cat /proc/cpuinfo
6958 - name : Build libraries
70- id : build
7159 shell : bash
7260 run : |
73- if [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" || "${{ github.event.inputs.enable_cuda_build }}" == "true" ]]; then
74- .github/dockcross/dockcross-manylinux_2_28-x64 .github/build_cuda_linux.sh "-DOS_NAME=Linux -DOS_ARCH=x86_64"
75- echo "built=true" >> "$GITHUB_OUTPUT"
76- else
77- echo "CUDA compilation skipped — set enable_cuda_build=true or trigger a release event to build CUDA artifacts"
78- echo "built=false" >> "$GITHUB_OUTPUT"
79- fi
61+ .github/dockcross/dockcross-manylinux_2_28-x64 .github/build_cuda_linux.sh "-DOS_NAME=Linux -DOS_ARCH=x86_64"
8062 - name : Upload artifacts
81- if : steps.build.outputs.built == 'true'
8263 uses : actions/upload-artifact@v7
8364 with :
8465 name : linux-libraries-cuda
@@ -616,8 +597,7 @@ jobs:
616597 pattern : " *-libraries"
617598 merge-multiple : true
618599 path : ${{ github.workspace }}/src/main/resources/net/ladenthin/llama/
619- - if : needs.crosscompile-linux-x86_64-cuda.outputs.built == 'true'
620- uses : actions/download-artifact@v8
600+ - uses : actions/download-artifact@v8
621601 with :
622602 name : linux-libraries-cuda
623603 path : ${{ github.workspace }}/src/main/resources_linux_cuda/net/ladenthin/llama/
@@ -683,7 +663,7 @@ jobs:
683663
684664 publish-snapshot :
685665 name : Publish Snapshot to Central
686- needs : [check-snapshot]
666+ needs : [check-snapshot, crosscompile-linux-x86_64-cuda ]
687667 if : needs.check-snapshot.result == 'success'
688668 runs-on : ubuntu-latest
689669 environment : maven-central
@@ -696,6 +676,10 @@ jobs:
696676 pattern : " *-libraries"
697677 merge-multiple : true
698678 path : ${{ github.workspace }}/src/main/resources/net/ladenthin/llama/
679+ - uses : actions/download-artifact@v8
680+ with :
681+ name : linux-libraries-cuda
682+ path : ${{ github.workspace }}/src/main/resources_linux_cuda/net/ladenthin/llama/
699683 - name : Set up Maven Central Repository
700684 uses : actions/setup-java@v5
701685 with :
@@ -707,7 +691,7 @@ jobs:
707691 gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
708692 gpg-passphrase : MAVEN_GPG_PASSPHRASE
709693 - name : Publish snapshot
710- run : mvn --batch-mode -P release -Dmaven.test.skip=true deploy
694+ run : mvn --batch-mode -P release,cuda -Dmaven.test.skip=true deploy
711695 env :
712696 MAVEN_USERNAME : ${{ secrets.CENTRAL_USERNAME }}
713697 MAVEN_PASSWORD : ${{ secrets.CENTRAL_TOKEN }}
@@ -750,7 +734,7 @@ jobs:
750734
751735 publish-release :
752736 name : Publish Release to Central
753- if : needs.check-tag.result == 'success' && github.event.inputs.release_to_maven_central == 'true'
737+ if : needs.check-tag.result == 'success'
754738 needs : [check-tag, crosscompile-linux-x86_64-cuda]
755739 runs-on : ubuntu-latest
756740 environment : maven-central
@@ -763,8 +747,7 @@ jobs:
763747 pattern : " *-libraries"
764748 merge-multiple : true
765749 path : ${{ github.workspace }}/src/main/resources/net/ladenthin/llama/
766- - if : needs.crosscompile-linux-x86_64-cuda.outputs.built == 'true'
767- uses : actions/download-artifact@v8
750+ - uses : actions/download-artifact@v8
768751 with :
769752 name : linux-libraries-cuda
770753 path : ${{ github.workspace }}/src/main/resources_linux_cuda/net/ladenthin/llama/
0 commit comments