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

Incorporate review suggestions

* Use Python 3.10.
* Add stages to pipeline.
* Introduce new file to be included locally and move default keyword
and extensions into that new file.
* Add stage keyword to all CI jobs.
* Reorder keywords in CI jobs that use extends keyword.
* Use full relative path to executable when calling app.
* Use needs keyword to define dependencies.
* Use artifacts sub-key of nedds keyword in favour of dependencies
keyword.
parent ac63f92f
No related branches found
No related tags found
No related merge requests found
......@@ -5,20 +5,8 @@
---
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" ]
include:
- local: ".gitlab/ci/common.gitlab-ci.yml"
- local: ".gitlab/ci/lint.gitlab-ci.yml"
- local: ".gitlab/ci/build.gitlab-ci.yml"
- local: ".gitlab/ci/test.gitlab-ci.yml"
......
......@@ -6,17 +6,17 @@
---
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
...
# SPDX-FileCopyrightText: 2022 Helmholtz Centre for Environmental Research (UFZ)
# SPDX-FileCopyrightText: 2022 Helmholtz-Zentrum Dresden-Rossendorf (HZDR)
#
# SPDX-License-Identifier: MIT
---
stages:
- lint
- build
- test
- run
default:
image: python:3.10
.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" ]
...
......@@ -6,6 +6,7 @@
---
license_compliance:
stage: lint
before_script:
- pip install --upgrade pip
- pip install reuse
......@@ -14,6 +15,7 @@ license_compliance:
interruptible: true
lint:
stage: lint
before_script:
- pip install --upgrade pip
- pip install cpplint
......
......@@ -7,10 +7,12 @@
run:
image: gcc:11
stage: run
script:
- cd build_gcc_11/bin/ && ./helloWorld
dependencies: ["build:gcc"]
needs: ["build:gcc", "test:gcc"]
needs:
- job: "build:gcc"
artifacts: true
interruptible: true
...
......@@ -6,14 +6,16 @@
---
test:gcc:
image: gcc:${VERSION}
extends:
- .install_dependencies
- .compiler_versions
image: gcc:${VERSION}
stage: test
script:
- cd build_gcc_${VERSION} && ctest
dependencies: ["build:gcc"]
needs: ["build:gcc"]
needs:
- job: "build:gcc"
artifacts: true
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