mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	feat: Run unittests in parallel with Github Actions (#483)
Implement parallel execution for unit tests using Github Actions to improve CI pipeline efficiency and reduce build times.
This commit is contained in:
		
							
								
								
									
										11
									
								
								docker-unit-tests.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										11
									
								
								docker-unit-tests.sh
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,4 +1,11 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
#!/bin/bash -x
 | 
			
		||||
 | 
			
		||||
BUILD_CORES=$(echo "scale=0 ; `nproc` / 1.337" | bc)
 | 
			
		||||
 | 
			
		||||
if [[ "$GITHUB_REPOSITORY" == "" ]]; then
 | 
			
		||||
  #Default
 | 
			
		||||
  BUILD_CORES=8
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "Mounting $(pwd)/io in ubuntu and running unit tests"
 | 
			
		||||
docker run --rm -i -v $(pwd):/io ubuntu sh -c '/io/release-build/xahaud -u'
 | 
			
		||||
docker run --rm -i -v $(pwd):/io -e BUILD_CORES=$BUILD_CORES ubuntu sh -c '/io/release-build/xahaud --unittest-jobs $BUILD_CORES -u'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user