Initial commit
This commit is contained in:
121
CI/templates.yml
Normal file
121
CI/templates.yml
Normal file
@@ -0,0 +1,121 @@
|
||||
.Build:
|
||||
variables:
|
||||
BUILD_TYPE: 'Release'
|
||||
CCACHE_BASEDIR: $CI_PROJECT_DIR
|
||||
CCACHE_DIR: $CI_PROJECT_DIR/ccache
|
||||
CCACHE_COMPILERCHECK: "content"
|
||||
image: registry.gitlab.com/bigfootdev/docker/linuxbigfootbuilder:main
|
||||
stage: build
|
||||
before_script:
|
||||
- ccache --zero-stats
|
||||
script:
|
||||
- conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=$BUILD_TYPE -o bigfoot/*:unity_build=False -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:build_benchmarks_lto=True -o bigfoot/*:render_doc=True
|
||||
- cmake -S . -B ./build/$BUILD_TYPE --toolchain ./build/$BUILD_TYPE/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Ninja"
|
||||
- cmake --build build/$BUILD_TYPE --parallel $(nproc)
|
||||
after_script:
|
||||
- ccache --show-stats
|
||||
dependencies: []
|
||||
artifacts:
|
||||
when: always
|
||||
name: Build$BUILD_TYPE
|
||||
paths:
|
||||
- build/$BUILD_TYPE
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
- key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- $CCACHE_DIR
|
||||
tags:
|
||||
- linux
|
||||
- c++
|
||||
- bigfootdev
|
||||
|
||||
.BuildUnity:
|
||||
variables:
|
||||
BUILD_TYPE: 'Release'
|
||||
CCACHE_BASEDIR: $CI_PROJECT_DIR
|
||||
CCACHE_DIR: $CI_PROJECT_DIR/ccache
|
||||
CCACHE_COMPILERCHECK: "content"
|
||||
image: registry.gitlab.com/bigfootdev/docker/linuxbigfootbuilder:main
|
||||
stage: build-unity
|
||||
before_script:
|
||||
- ccache --zero-stats
|
||||
script:
|
||||
- conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=$BUILD_TYPE -o bigfoot/*:unity_build=True -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:build_benchmarks_lto=True -o bigfoot/*:render_doc=True
|
||||
- cmake -S . -B ./build/$BUILD_TYPE --toolchain ./build/$BUILD_TYPE/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Ninja"
|
||||
- cmake --build build/$BUILD_TYPE --parallel $(nproc)
|
||||
after_script:
|
||||
- ccache --show-stats
|
||||
dependencies: []
|
||||
artifacts:
|
||||
when: always
|
||||
name: Build$BUILD_TYPE
|
||||
paths:
|
||||
- build/$BUILD_TYPE
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
- key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- $CCACHE_DIR
|
||||
tags:
|
||||
- linux
|
||||
- c++
|
||||
- bigfootdev
|
||||
|
||||
.UnitTests:
|
||||
variables:
|
||||
BUILD_TYPE: 'Release'
|
||||
image: registry.gitlab.com/bigfootdev/docker/linuxbigfootbuilder:main
|
||||
stage: unit-tests
|
||||
script:
|
||||
- cd ./build/$BUILD_TYPE
|
||||
- xvfb-run ctest . --output-on-failure
|
||||
artifacts:
|
||||
when: always
|
||||
name: Test$BUILD_TYPE
|
||||
paths:
|
||||
- build/$BUILD_TYPE
|
||||
reports:
|
||||
junit: ./build/$BUILD_TYPE/TestResults/*.xml
|
||||
tags:
|
||||
- linux
|
||||
- c++
|
||||
- bigfootdev
|
||||
|
||||
.SonarCloud:
|
||||
variables:
|
||||
CCACHE_BASEDIR: $CI_PROJECT_DIR
|
||||
CCACHE_DIR: $CI_PROJECT_DIR/ccache
|
||||
CCACHE_COMPILERCHECK: "content"
|
||||
image: registry.gitlab.com/bigfootdev/docker/linuxbigfootcoveragebuilder:main
|
||||
stage: sonar
|
||||
before_script:
|
||||
- ccache --zero-stats
|
||||
- curl -sSLo ./sonar-scanner.zip 'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-7.2.0.5079-linux-x64.zip'
|
||||
- unzip -o sonar-scanner.zip
|
||||
- mv sonar-scanner-7.2.0.5079-linux-x64 sonar-scanner
|
||||
- curl -sSLo ./build-wrapper-linux-x86.zip "${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip"
|
||||
- unzip -oj build-wrapper-linux-x86.zip -d ./build-wrapper
|
||||
script:
|
||||
- conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=gcc_coverage -pr:b=gcc_coverage --build=missing -s build_type=Debug -o bigfoot/*:unity_build=False -o bigfoot/*:build_tests=True -o bigfoot/*:sample_app=False -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=False -o bigfoot/*:build_benchmarks_lto=False -o bigfoot/*:render_doc=False
|
||||
- cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja"
|
||||
- ./build-wrapper/build-wrapper-linux-x86-64 --out-dir bw-output cmake --build ./build/Debug --parallel $(nproc)
|
||||
- chmod +x sonarqube.sh && xvfb-run ./sonarqube.sh
|
||||
- ./sonar-scanner/bin/sonar-scanner -Dsonar.host.url="${SONAR_HOST_URL}" -Dsonar.token="${SONAR_BIGFOOT2_TOKEN}" -Dsonar.cfamily.compile-commands=bw-output/compile_commands.json -Dsonar.coverageReportPaths=SonarqubeResult/CoverageReport/coverage.xml -Dsonar.cfamily.cppunit.reportsPath=SonarqubeResult/UnitTests/Merged/CPPUnit
|
||||
after_script:
|
||||
- ccache --show-stats
|
||||
artifacts:
|
||||
when: always
|
||||
name: BuildAndCoverage
|
||||
paths:
|
||||
- build/Debug
|
||||
- SonarqubeResult
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
- key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- $CCACHE_DIR
|
||||
tags:
|
||||
- linux
|
||||
- c++
|
||||
- bigfootdev
|
||||
Reference in New Issue
Block a user