contrib : recommend PRs to llama.cpp #2246
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-13] | |
libraries: [shared, static] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies for Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install llvm | |
- name: Create Build Environment | |
run: mkdir build | |
- name: Configure CMake | |
working-directory: ./build | |
run: cmake .. | |
-G Ninja | |
-DCMAKE_C_COMPILER=clang | |
-DCMAKE_CXX_COMPILER=clang++ | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installed | |
-DGGML_METAL=OFF | |
${{ contains(matrix.libraries, 'static') && '-DBUILD_SHARED_LIBS=OFF' || '-DBUILD_SHARED_LIBS=ON' }} | |
- name: Build | |
working-directory: ./build | |
run: cmake --build . | |
- name: Test | |
working-directory: ./build | |
run: ctest --verbose --timeout 900 | |
- name: Install | |
working-directory: ./build | |
run: cmake --build . --target install | |
- name: Test CMake config | |
run: | | |
mkdir test-cmake | |
cmake -S examples/test-cmake -B test-cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed | |
cmake --build test-cmake | |
windows: | |
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || | |
github.event.inputs.run_type == 'full-ci' }} | |
runs-on: windows-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Configure | |
run: > | |
cmake -S . -B ./build -A x64 | |
-DCMAKE_BUILD_TYPE=Release | |
-DBUILD_SHARED_LIBS=ON | |
- name: Build | |
run: | | |
cd ./build | |
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64 |