Setup CI on gitlab
Co-authored-by: Joel Falcou <joel.falcou@lri.fr> See merge request oss/rotgen!5
This commit is contained in:
parent
95ae1ef1e4
commit
7b395f6ad8
3 changed files with 113 additions and 1 deletions
57
.gitlab-ci.yml
Normal file
57
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# https://docs.gitlab.com/ee/ci/yaml/
|
||||
|
||||
# Job templates
|
||||
|
||||
.docker-job: &docker-job
|
||||
tags: [docker]
|
||||
cache:
|
||||
paths: [/var/cache/pacman, build/]
|
||||
image: archlinux/archlinux:base-devel
|
||||
before_script: [./ci-cd/environment-setup.sh]
|
||||
|
||||
.native-job: &native-job
|
||||
tags: ["shell"]
|
||||
cache:
|
||||
paths: [build/]
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
# Native stuff
|
||||
|
||||
build-debug-native:
|
||||
<<: *native-job
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- build/debug/
|
||||
script:
|
||||
- cmake --preset debug -DCMAKE_CXX_COMPILER=clang++
|
||||
- cmake --build --preset debug
|
||||
|
||||
build-release-native:
|
||||
<<: *native-job
|
||||
stage: build
|
||||
artifacts:
|
||||
paths:
|
||||
- build/release/
|
||||
script:
|
||||
- cmake --preset release -DCMAKE_CXX_COMPILER=clang++
|
||||
- cmake --build --preset release
|
||||
|
||||
test-debug-native:
|
||||
<<: *native-job
|
||||
needs: ["build-debug-native"]
|
||||
stage: test
|
||||
script:
|
||||
- cmake --build --preset debug --target rotgen-test
|
||||
- cd build/debug && ctest --output-on-failure
|
||||
|
||||
test-release-native:
|
||||
<<: *native-job
|
||||
needs: ["build-release-native"]
|
||||
stage: test
|
||||
script:
|
||||
- cmake --build --preset release --target rotgen-test
|
||||
- cd build/release && ctest --output-on-failure
|
||||
Loading…
Add table
Add a link
Reference in a new issue