Skip to content
Snippets Groups Projects
Verified Commit eb51a8d9 authored by Hueser, Christian's avatar Hueser, Christian
Browse files

Remove redundancies from CI pipeline

* Remove redundancies from CI pipeline by using defaults, extends
and matrix keywords.
parent 01cf00f5
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,20 @@ stages:
- test
- run
default:
image: python:3.9
.install_dependencies:
before_script:
- apt-get update && apt-get -qy install python3 python3-pip
- pip3 install cmake
.compiler_versions:
parallel:
matrix:
- VERSION: [ "10", "11", "12" ]
license_compliance:
image: python:3.11
stage: lint
before_script:
- pip install --upgrade pip
......@@ -21,7 +33,6 @@ license_compliance:
- reuse lint
lint:
image: python:3.11
stage: lint
before_script:
- pip install --upgrade pip
......@@ -29,60 +40,36 @@ lint:
script:
- cpplint --recursive src/ tests/
build:gcc:11:
image: gcc:11
stage: build
before_script:
- apt-get update && apt-get -qy install python3 python3-pip
- pip3 install cmake
script:
- cmake -S . -B build
- cmake --build build
artifacts:
paths:
- build/
build:gcc:12:
image: gcc:12
build:gcc:
image: gcc:${VERSION}
stage: build
before_script:
- apt-get update && apt-get -qy install python3 python3-pip
- pip3 install cmake
extends:
- .install_dependencies
- .compiler_versions
script:
- cmake -S . -B build
- cmake --build build
- cmake -S . -B build_gcc_${VERSION}
- cmake --build build_gcc_${VERSION}
artifacts:
paths:
- build/
- build_gcc_${VERSION}
test:gcc:11:
image: gcc:11
test:gcc:
image: gcc:${VERSION}
stage: test
before_script:
- apt-get update && apt-get -qy install python3 python3-pip
- pip3 install cmake
extends:
- .install_dependencies
- .compiler_versions
script:
- cd build && ctest
- cd build_gcc_${VERSION} && ctest
dependencies:
- build:gcc:11
test:gcc:12:
image: gcc:12
stage: test
before_script:
- apt-get update && apt-get -qy install python3 python3-pip
- pip3 install cmake
script:
- cd build && ctest
dependencies:
- build:gcc:12
- "build:gcc"
run:
image: gcc:12
image: gcc:11
stage: run
script:
- ./build/bin/helloWorld
- cd build_gcc_11/bin/ && ./helloWorld
dependencies:
- build:gcc:12
- "build:gcc"
...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment