mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 19:52:29 +00:00 
			
		
		
		
	[TravisCI] Implement TravisCI build and testing infrastructure for Linux
The Linux builds rely on Docker (using Ubuntu 16.04LTS and Ubuntu 14.04LTS) to build and test Z3 so that builds are easily reproducible. A build status button has been added to `README.md` so that it is easy to see the current build status. More documentation can be found in `contrib/ci/README.md`. This implementation currently tests 13 different configurations. If build times become too long we can remove some of them. Although it would be nice to test macOS builds that requires significantly more work so I have left this as future work.
This commit is contained in:
		
							parent
							
								
									be4b0ffe69
								
							
						
					
					
						commit
						8310fed528
					
				
					 21 changed files with 1107 additions and 3 deletions
				
			
		
							
								
								
									
										54
									
								
								contrib/ci/scripts/test_z3_system_tests.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										54
									
								
								contrib/ci/scripts/test_z3_system_tests.sh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,54 @@ | |||
| #!/bin/bash | ||||
| 
 | ||||
| set -x | ||||
| set -e | ||||
| set -o pipefail | ||||
| 
 | ||||
| : ${Z3_BUILD_DIR?"Z3_BUILD_DIR must be specified"} | ||||
| : ${Z3_BUILD_TYPE?"Z3_BUILD_TYPE must be specified"} | ||||
| : ${RUN_SYSTEM_TESTS?"RUN_SYSTEM_TESTS must be speicifed"} | ||||
| : ${PYTHON_BINDINGS?"PYTHON_BINDINGS must be specified"} | ||||
| : ${PYTHON_EXECUTABLE?"PYTHON_EXECUTABLE must be specified"} | ||||
| : ${Z3_SYSTEM_TEST_DIR?"Z3_SYSTEM_TEST_DIR must be specified"} | ||||
| 
 | ||||
| if [ "X${RUN_SYSTEM_TESTS}" != "X1" ]; then | ||||
|   echo "Skipping system tests" | ||||
|   exit 0 | ||||
| fi | ||||
| 
 | ||||
| Z3_EXE="${Z3_BUILD_DIR}/z3" | ||||
| Z3_LIB_DIR="${Z3_BUILD_DIR}" | ||||
| 
 | ||||
| # Set value if not already defined externally | ||||
| Z3_SYSTEM_TEST_GIT_URL="${Z3_GIT_URL:-https://github.com/Z3Prover/z3test.git}" | ||||
| 
 | ||||
| # Clone repo to destination | ||||
| mkdir -p "${Z3_SYSTEM_TEST_GIT_URL}" | ||||
| git clone "${Z3_SYSTEM_TEST_GIT_URL}" "${Z3_SYSTEM_TEST_DIR}" | ||||
| cd "${Z3_SYSTEM_TEST_DIR}" | ||||
| 
 | ||||
| if [ -n "${Z3_SYSTEM_TEST_GIT_REVISION}" ]; then | ||||
|   # If a particular revision is requested then check it out. | ||||
|   # This is useful for reproducible builds | ||||
|   git checkout "${Z3_SYSTEM_TEST_GIT_REVISION}" | ||||
| fi | ||||
| 
 | ||||
| ############################################################################### | ||||
| # Run system tests | ||||
| ############################################################################### | ||||
| 
 | ||||
| # SMTLIBv2 tests | ||||
| ${PYTHON_EXECUTABLE} scripts/test_benchmarks.py "${Z3_EXE}" regressions/smt2 | ||||
| 
 | ||||
| ${PYTHON_EXECUTABLE} scripts/test_benchmarks.py "${Z3_EXE}" regressions/smt2-extra | ||||
| 
 | ||||
| if [ "X${Z3_BUILD_TYPE}" = "XDebug" ]; then | ||||
|   ${PYTHON_EXECUTABLE} scripts/test_benchmarks.py "${Z3_EXE}" regressions/smt2-debug | ||||
| fi | ||||
| 
 | ||||
| if [ "X${PYTHON_BINDINGS}" = "X1" ]; then | ||||
|   # Run python binding tests | ||||
|   ${PYTHON_EXECUTABLE} scripts/test_pyscripts.py "${Z3_LIB_DIR}" regressions/python/ | ||||
| fi | ||||
| 
 | ||||
| # FIXME: Run `scripts/test_cs.py` once it has been modified to support mono | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue