Something went wrong on our end
-
Nicolas Pope authoredNicolas Pope authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 3.04 KiB
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages:
- build
- test
sast:
stage: test
include:
- template: Security/SAST.gitlab-ci.yml
image: ubuntu:jammy
linux:build:
only:
- main
- merge_requests
stage: build
tags:
- docker
script:
- DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential uuid-dev git libmsgpack-dev liburiparser-dev libgnutls28-dev cmake ninja-build
- mkdir build && cd build
- cmake $CI_PROJECT_DIR -GNinja -DCMAKE_CXX_FLAGS="-fdiagnostics-color" -DUSE_CPPCHECK=FALSE -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB
- ninja
#cache:
# paths:
# - build/
artifacts:
name: ${CI_PROJECT_NAME}-${CI_COMMIT_SHORT_SHA}
paths:
- build/
expire_in: 1 hour
linux:test:
only:
- main
- merge_requests
stage: test
tags:
- docker
needs: ["linux:build"]
script:
- DEBIAN_FRONTEND=noninteractive apt update && apt install -y libmsgpackc2 liburiparser1 cmake
- cd build
- ctest -V --output-junit report.xml
artifacts:
when: always
reports:
junit: build/report.xml
### Windows
#windows:build:
# only:
# - main
# - merge_requests
# stage: build
# tags:
# - windows
# cache: # use artifacts instead if multiple runners available
# key: $CI_COMMIT_SHORT_SHA
# paths:
# - build/
# script:
# - Import-Module "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/Microsoft.VisualStudio.DevShell.dll"
# - Enter-VsDevShell -VsInstallPath "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/"
# - cd $CI_PROJECT_DIR
# - if (Test-Path build) { Remove-Item build/ -Recurse }
# - mkdir build
# - cd build
# - cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DWITH_GNUTLS=TRUE -DGNUTLS_INCLUDE_DIR="C:/Build/bin/gnutls/lib/includes/" -DGNUTLS_LIBRARY="C:/Build/bin/gnutls/lib/libgnutls.dll.a" ..
# - '& MSBuild.exe beyond-ftl.sln -property:Configuration=Release -nr:false -maxCpuCount'
#windows:test:
# only:
# - master
# - merge_requests
# stage: test
# tags:
# - windows
# needs: ["windows:build"]
# cache: # use artifacts instead if multiple runners available
# key: $CI_COMMIT_SHORT_SHA
# paths:
# - build/
# script:
# - $env:PATH+=";C:/Shared/Deploy"
# - cd build
# - ctest -V --output-on-failure --timeout 60