mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	Add GH workflow, fix test
This commit is contained in:
		
							
								
								
									
										28
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@@ -101,6 +101,34 @@ jobs:
 | 
			
		||||
          cd build
 | 
			
		||||
          ctest --verbose
 | 
			
		||||
 | 
			
		||||
  ubuntu-latest-cmake-mpi:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Clone
 | 
			
		||||
        id: checkout
 | 
			
		||||
        uses: actions/checkout@v1
 | 
			
		||||
 | 
			
		||||
      - name: Dependencies
 | 
			
		||||
        id: depends
 | 
			
		||||
        run: |
 | 
			
		||||
          sudo apt-get update
 | 
			
		||||
          sudo apt-get install build-essential mpich
 | 
			
		||||
 | 
			
		||||
      - name: Build
 | 
			
		||||
        id: cmake_build
 | 
			
		||||
        run: |
 | 
			
		||||
          mkdir build
 | 
			
		||||
          cd build
 | 
			
		||||
          cmake -DLLAMA_MPI=ON ..
 | 
			
		||||
          cmake --build . --config Release
 | 
			
		||||
 | 
			
		||||
      - name: Test
 | 
			
		||||
        id: cmake_test
 | 
			
		||||
        run: |
 | 
			
		||||
          cd build
 | 
			
		||||
          ctest --verbose
 | 
			
		||||
 | 
			
		||||
  macOS-latest-make:
 | 
			
		||||
    runs-on: macos-latest
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -31,6 +31,8 @@ int main(int argc, char **argv) {
 | 
			
		||||
    llama_model * model;
 | 
			
		||||
    llama_context * ctx;
 | 
			
		||||
 | 
			
		||||
    llama_init_backend(false);
 | 
			
		||||
 | 
			
		||||
    // load the vocab
 | 
			
		||||
    {
 | 
			
		||||
        auto lparams = llama_context_default_params();
 | 
			
		||||
@@ -97,5 +99,7 @@ int main(int argc, char **argv) {
 | 
			
		||||
    llama_free_model(model);
 | 
			
		||||
    llama_free(ctx);
 | 
			
		||||
 | 
			
		||||
    llama_finalize_backend();
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user