mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 12:56:39 +00:00 
			
		
		
		
	Merge branch 'coverity' into 'master'
Fix coverity builds See merge request OpenMW/openmw!4826
This commit is contained in:
		
						commit
						ef3f52d6a4
					
				
					 2 changed files with 26 additions and 9 deletions
				
			
		| 
						 | 
					@ -108,8 +108,8 @@ Coverity:
 | 
				
			||||||
    - ccache/
 | 
					    - ccache/
 | 
				
			||||||
  variables:
 | 
					  variables:
 | 
				
			||||||
    CCACHE_SIZE: 2G
 | 
					    CCACHE_SIZE: 2G
 | 
				
			||||||
    CC: clang-12
 | 
					    CC: clang
 | 
				
			||||||
    CXX: clang++-12
 | 
					    CXX: clang++
 | 
				
			||||||
    CMAKE_BUILD_TYPE: Debug
 | 
					    CMAKE_BUILD_TYPE: Debug
 | 
				
			||||||
    CMAKE_CXX_FLAGS_DEBUG: -O0
 | 
					    CMAKE_CXX_FLAGS_DEBUG: -O0
 | 
				
			||||||
  before_script:
 | 
					  before_script:
 | 
				
			||||||
| 
						 | 
					@ -125,18 +125,34 @@ Coverity:
 | 
				
			||||||
    - ccache -z -M "${CCACHE_SIZE}"
 | 
					    - ccache -z -M "${CCACHE_SIZE}"
 | 
				
			||||||
    - CI/before_script.linux.sh
 | 
					    - CI/before_script.linux.sh
 | 
				
			||||||
    - cov-analysis-linux64-*/bin/cov-configure --template --comptype prefix --compiler ccache
 | 
					    - cov-analysis-linux64-*/bin/cov-configure --template --comptype prefix --compiler ccache
 | 
				
			||||||
    # Remove the specific targets and build everything once we can do it under 3h
 | 
					 | 
				
			||||||
    - cov-analysis-linux64-*/bin/cov-build --dir cov-int cmake --build build -- -j $(nproc)
 | 
					    - cov-analysis-linux64-*/bin/cov-build --dir cov-int cmake --build build -- -j $(nproc)
 | 
				
			||||||
    - ccache -svv
 | 
					    - ccache -svv
 | 
				
			||||||
  after_script:
 | 
					 | 
				
			||||||
    - tar cfz cov-int.tar.gz cov-int
 | 
					    - tar cfz cov-int.tar.gz cov-int
 | 
				
			||||||
    - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
 | 
					    - echo "OPENMW_JOB_ID=$CI_JOB_ID" >> build.env
 | 
				
			||||||
      --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
 | 
					 | 
				
			||||||
      --form file=@cov-int.tar.gz --form version="$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA"
 | 
					 | 
				
			||||||
      --form description="CI_COMMIT_SHORT_SHA / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
 | 
					 | 
				
			||||||
  artifacts:
 | 
					  artifacts:
 | 
				
			||||||
 | 
					    expire_in: 1 day
 | 
				
			||||||
    paths:
 | 
					    paths:
 | 
				
			||||||
      - /builds/OpenMW/openmw/cov-int/build-log.txt
 | 
					      - /builds/OpenMW/openmw/cov-int/build-log.txt
 | 
				
			||||||
 | 
					      - /builds/OpenMW/openmw/cov-int.tar.gz
 | 
				
			||||||
 | 
					    reports:
 | 
				
			||||||
 | 
					      dotenv: build.env
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Coverity_Upload:
 | 
				
			||||||
 | 
					  image: ubuntu:24.04
 | 
				
			||||||
 | 
					  stage: build
 | 
				
			||||||
 | 
					  rules:
 | 
				
			||||||
 | 
					    - if: $CI_PIPELINE_SOURCE == "schedule"
 | 
				
			||||||
 | 
					  before_script:
 | 
				
			||||||
 | 
					    - CI/install_debian_deps.sh coverity_upload
 | 
				
			||||||
 | 
					  script:
 | 
				
			||||||
 | 
					    - echo "$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$OPENMW_JOB_ID/artifacts/cov-int.tar.gz"
 | 
				
			||||||
 | 
					    - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
 | 
				
			||||||
 | 
					      --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
 | 
				
			||||||
 | 
					      --form version="$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA"
 | 
				
			||||||
 | 
					      --form description="CI_COMMIT_SHORT_SHA / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
 | 
				
			||||||
 | 
					      --form url="$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$OPENMW_JOB_ID/artifacts/cov-int.tar.gz"
 | 
				
			||||||
 | 
					  needs:
 | 
				
			||||||
 | 
					    - Coverity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Ubuntu_GCC:
 | 
					Ubuntu_GCC:
 | 
				
			||||||
  extends: .Ubuntu
 | 
					  extends: .Ubuntu
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,8 @@ print_help() {
 | 
				
			||||||
declare -rA GROUPED_DEPS=(
 | 
					declare -rA GROUPED_DEPS=(
 | 
				
			||||||
  [gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config mold"
 | 
					  [gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config mold"
 | 
				
			||||||
  [clang]="binutils clang make cmake ccache curl unzip git pkg-config mold"
 | 
					  [clang]="binutils clang make cmake ccache curl unzip git pkg-config mold"
 | 
				
			||||||
  [coverity]="binutils clang-12 make cmake ccache curl unzip git pkg-config"
 | 
					  [coverity]="binutils clang make cmake ccache curl unzip git pkg-config file"
 | 
				
			||||||
 | 
					  [coverity_upload]="curl"
 | 
				
			||||||
  [gcc_preprocess]="
 | 
					  [gcc_preprocess]="
 | 
				
			||||||
    binutils
 | 
					    binutils
 | 
				
			||||||
    build-essential
 | 
					    build-essential
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue