updating code to match to match llamacpp tag b4689 #128
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Continuous Integration | |
| on: | |
| - pull_request | |
| - workflow_dispatch | |
| env: | |
| MODEL_URL: https://huggingface.co/TheBloke/CodeLlama-7B-GGUF/resolve/main/codellama-7b.Q2_K.gguf | |
| MODEL_NAME: codellama-7b.Q2_K.gguf | |
| jobs: | |
| build-and-test-linux: | |
| name: ubuntu-latest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: "11" | |
| - name: Install libcurl | |
| run: sudo apt-get install -y libcurl4-openssl-dev | |
| - name: Build libraries | |
| run: | | |
| mvn compile | |
| .github/build.sh -DLLAMA_VERBOSE=ON -DLLAMA_CURL=ON | |
| - name: Download model | |
| run: curl -L ${MODEL_URL} --create-dirs -o models/${MODEL_NAME} | |
| - name: Run tests | |
| run: mvn test | |
| - if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: error-log-linux | |
| path: ${{ github.workspace }}/hs_err_pid*.log | |
| if-no-files-found: warn | |
| build-and-test-macos: | |
| name: ${{ matrix.target.runner }} | |
| runs-on: ${{ matrix.target.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - runner: macos-13 | |
| cmake: -DLLAMA_METAL=OFF -DLLAMA_VERBOSE=ON -DLLAMA_CURL=ON | |
| - runner: macos-14 | |
| cmake: -DLLAMA_METAL_EMBED_LIBRARY=ON -DLLAMA_METAL=OFF -DLLAMA_VERBOSE=ON | |
| -DLLAMA_CURL=ON | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: "11" | |
| - name: Build libraries | |
| run: | | |
| mvn compile | |
| .github/build.sh ${{ matrix.target.cmake }} | |
| - name: Download model | |
| run: curl -L ${MODEL_URL} --create-dirs -o models/${MODEL_NAME} | |
| - name: Run tests | |
| run: mvn test | |
| - if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: error-log-macos | |
| path: ${{ github.workspace }}/hs_err_pid*.log | |
| if-no-files-found: warn | |
| build-and-test-windows: | |
| name: windows-latest | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '11' | |
| - name: Build libraries | |
| run: | | |
| mvn compile | |
| .github\build.bat -DLLAMA_VERBOSE=ON | |
| - name: Copy DLLs (including curl.dll) from vcpkg explicitly | |
| run: | | |
| mkdir -Force "target/classes/de/kherud/llama/Windows/x86_64" | |
| Copy-Item ".\src\main\resources\de\kherud\llama\Windows\x86_64\*.dll" "target/classes/de/kherud/llama/Windows/x86_64/" | |
| - name: Verify DLL placement | |
| run: | | |
| dir target\classes\de\kherud\llama\Windows\x86_64\ | |
| - name: Download model | |
| run: curl -L $env:MODEL_URL --create-dirs -o models/$env:MODEL_NAME | |
| - name: Run tests | |
| run: mvn test "-Djava.library.path=${env:PATH};${{ github.workspace }}\target\classes\de\kherud\llama\Windows\x86_64 -Ddebug.native.loading=true" | |
| - if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: error-log-windows | |
| path: ${{ github.workspace }}\hs_err_pid*.log | |
| if-no-files-found: warn | |