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

Add reference solution for exercise 1 in episode 6

* Reference solution for exericse 1 in episode 6 uses a stageless
pipeline and the interruptible keyword.
parent 6e0823ea
No related branches found
No related tags found
No related merge requests found
......@@ -5,14 +5,8 @@
---
stages:
- lint
- build
- test
- run
default:
image: python:3.11
image: python:3.9
.install_dependencies:
before_script:
......@@ -22,54 +16,55 @@ default:
.compiler_versions:
parallel:
matrix:
- VERSION: [ "11", "12" ]
- VERSION: [ "10", "11", "12" ]
license_compliance:
stage: lint
before_script:
- pip install --upgrade pip
- pip install reuse
script:
- reuse lint
interruptible: true
lint:
stage: lint
before_script:
- pip install --upgrade pip
- pip install cpplint
script:
- cpplint --recursive src/ tests/
interruptible: true
build:gcc:
image: gcc:${VERSION}
extends:
- .install_dependencies
- .compiler_versions
image: gcc:${VERSION}
stage: build
script:
- cmake -S . -B build_gcc_${VERSION}
- cmake --build build_gcc_${VERSION}
artifacts:
paths:
- build_gcc_${VERSION}
needs: ["lint"]
interruptible: true
test:gcc:
image: gcc:${VERSION}
extends:
- .install_dependencies
- .compiler_versions
image: gcc:${VERSION}
stage: test
script:
- cd build_gcc_${VERSION} && ctest
dependencies:
- "build:gcc"
dependencies: ["build:gcc"]
needs: ["build:gcc"]
interruptible: true
run:
image: gcc:12
stage: run
image: gcc:11
script:
- ./build_gcc_12/bin/helloWorld
dependencies:
- "build:gcc"
- cd build_gcc_11/bin/ && ./helloWorld
dependencies: ["build:gcc"]
needs: ["build:gcc", "test:gcc"]
interruptible: true
...
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