mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	ci : multithreaded builds (#3311)
* mac and linux threads * windows * Update build.yml * Update build.yml * Update build.yml * automatically get thread count * windows syntax * try to fix freebsd * Update build.yml * Update build.yml * Update build.yml
This commit is contained in:
		
							
								
								
									
										30
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@@ -38,13 +38,13 @@ jobs:
 | 
				
			|||||||
      - name: Build
 | 
					      - name: Build
 | 
				
			||||||
        id: make_build
 | 
					        id: make_build
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          CC=gcc-8 make
 | 
					          CC=gcc-8 make -j $(nproc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Test
 | 
					      - name: Test
 | 
				
			||||||
        id: make_test
 | 
					        id: make_test
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          CC=gcc-8 make tests
 | 
					          CC=gcc-8 make tests -j $(nproc)
 | 
				
			||||||
          make test
 | 
					          make test -j $(nproc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ubuntu-latest-cmake:
 | 
					  ubuntu-latest-cmake:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
@@ -66,7 +66,7 @@ jobs:
 | 
				
			|||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          cmake ..
 | 
					          cmake ..
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j $(nproc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Test
 | 
					      - name: Test
 | 
				
			||||||
        id: cmake_test
 | 
					        id: cmake_test
 | 
				
			||||||
@@ -101,7 +101,7 @@ jobs:
 | 
				
			|||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          cmake .. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
 | 
					          cmake .. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
 | 
				
			||||||
          cmake --build . --config ${{ matrix.build_type }}
 | 
					          cmake --build . --config ${{ matrix.build_type }} -j $(nproc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Test
 | 
					      - name: Test
 | 
				
			||||||
        id: cmake_test
 | 
					        id: cmake_test
 | 
				
			||||||
@@ -135,7 +135,7 @@ jobs:
 | 
				
			|||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          cmake -DLLAMA_MPI=ON ..
 | 
					          cmake -DLLAMA_MPI=ON ..
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j $(nproc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Test
 | 
					      - name: Test
 | 
				
			||||||
        id: cmake_test
 | 
					        id: cmake_test
 | 
				
			||||||
@@ -160,13 +160,13 @@ jobs:
 | 
				
			|||||||
      - name: Build
 | 
					      - name: Build
 | 
				
			||||||
        id: make_build
 | 
					        id: make_build
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          make
 | 
					          make -j $(sysctl -n hw.logicalcpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Test
 | 
					      - name: Test
 | 
				
			||||||
        id: make_test
 | 
					        id: make_test
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          make tests
 | 
					          make tests -j $(sysctl -n hw.logicalcpu)
 | 
				
			||||||
          make test
 | 
					          make test -j $(sysctl -n hw.logicalcpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  macOS-latest-cmake:
 | 
					  macOS-latest-cmake:
 | 
				
			||||||
    runs-on: macos-latest
 | 
					    runs-on: macos-latest
 | 
				
			||||||
@@ -189,7 +189,7 @@ jobs:
 | 
				
			|||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          cmake -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF ..
 | 
					          cmake -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF ..
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Test
 | 
					      - name: Test
 | 
				
			||||||
        id: cmake_test
 | 
					        id: cmake_test
 | 
				
			||||||
@@ -223,7 +223,7 @@ jobs:
 | 
				
			|||||||
            -DLLAMA_BUILD_SERVER=OFF \
 | 
					            -DLLAMA_BUILD_SERVER=OFF \
 | 
				
			||||||
            -DCMAKE_SYSTEM_NAME=iOS \
 | 
					            -DCMAKE_SYSTEM_NAME=iOS \
 | 
				
			||||||
            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
 | 
					            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  macOS-latest-cmake-tvos:
 | 
					  macOS-latest-cmake-tvos:
 | 
				
			||||||
    runs-on: macos-latest
 | 
					    runs-on: macos-latest
 | 
				
			||||||
@@ -251,7 +251,7 @@ jobs:
 | 
				
			|||||||
            -DLLAMA_BUILD_SERVER=OFF \
 | 
					            -DLLAMA_BUILD_SERVER=OFF \
 | 
				
			||||||
            -DCMAKE_SYSTEM_NAME=tvOS \
 | 
					            -DCMAKE_SYSTEM_NAME=tvOS \
 | 
				
			||||||
            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
 | 
					            -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j $(sysctl -n hw.logicalcpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  windows-latest-cmake:
 | 
					  windows-latest-cmake:
 | 
				
			||||||
    runs-on: windows-latest
 | 
					    runs-on: windows-latest
 | 
				
			||||||
@@ -324,7 +324,7 @@ jobs:
 | 
				
			|||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          cmake .. ${{ matrix.defines }}
 | 
					          cmake .. ${{ matrix.defines }}
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Add clblast.dll
 | 
					      - name: Add clblast.dll
 | 
				
			||||||
        id: add_clblast_dll
 | 
					        id: add_clblast_dll
 | 
				
			||||||
@@ -415,7 +415,7 @@ jobs:
 | 
				
			|||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          cmake .. -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON -DBUILD_SHARED_LIBS=ON
 | 
					          cmake .. -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON -DBUILD_SHARED_LIBS=ON
 | 
				
			||||||
          cmake --build . --config Release
 | 
					          cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Determine tag name
 | 
					      - name: Determine tag name
 | 
				
			||||||
        id: tag
 | 
					        id: tag
 | 
				
			||||||
@@ -472,7 +472,7 @@ jobs:
 | 
				
			|||||||
#        run: |
 | 
					#        run: |
 | 
				
			||||||
#            sudo pkg update
 | 
					#            sudo pkg update
 | 
				
			||||||
#            sudo pkg install -y gmake automake autoconf pkgconf llvm15 clinfo clover opencl clblast openblas
 | 
					#            sudo pkg install -y gmake automake autoconf pkgconf llvm15 clinfo clover opencl clblast openblas
 | 
				
			||||||
#            gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15
 | 
					#            gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15 -j `sysctl -n hw.ncpu`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  release:
 | 
					  release:
 | 
				
			||||||
    if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
 | 
					    if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user