Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 34 additions & 44 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,52 @@
---
variables:
DOCKER_HOST: "tcp://docker:2375"
DOCKER_IMAGE: samconf-ci:$CI_COMMIT_REF_SLUG
# Runner will discover the UID and GID of the user configured in the image used by the build container
# and will change the ownership of the working directory and files by running the chmod command in the
# predefined container (after updating sources, restoring cache and downloading artifacts).
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
SOURCES_URI: "https://github/elektrobit"
SAMCONF_DEPENDENCY_CONFIG: "ci/dependency_default.json"

workflow:
auto_cancel:
on_new_commit: interruptible


stages:
- docker-image
- build
- test

default:
image: $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
services:
- name: docker:24-dind
alias: docker
variables:
DOCKER_TLS_CERTDIR: ""
tags:
- "docker"
interruptible: true

before_script:
- env | sort
- docker
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
timeout: 1 hour
before_script:
- env | sort

build-docker-image:
stage: docker-image
image: ubuntu:jammy
before_script:
- apt-get update
- apt-get install -y docker.io
stage: .pre
services:
- name: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/docker:29-dind
variables:
DOCKER_TLS_CERTDIR: ""
# hostname of dind container inside the private network has to be "docker"
alias: docker
command: ["--tls=false"]
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/docker:latest
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $DOCKER_IMAGE -f ci/Dockerfile
--build-arg UID=$(id -u) --build-arg GID=$(id -g)
--build-arg ASMCOV_URI="$ASMCOV_URI"
ci/
- docker tag $DOCKER_IMAGE $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
- docker push $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
- echo "$CI_DEPENDENCY_PROXY_PASSWORD" | docker login $CI_DEPENDENCY_PROXY_SERVER -u $CI_DEPENDENCY_PROXY_USER --password-stdin

- docker build
--pull
--push
--cache-from $CI_REGISTRY_IMAGE:buildcache
--build-arg BUILDKIT_INLINE_CACHE=1
--build-arg CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX=$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/
--build-arg REPO=amd64
--build-arg UBUNTU_RELEASE=jammy
--tag $CI_REGISTRY_IMAGE:buildcache
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
-f ci/Dockerfile .

build-dependencies:
stage: build
needs:
- build-docker-image
script:
- ci/install_deps.py -c ci/dependencies_emlix.json
artifacts:
Expand All @@ -56,7 +57,6 @@ build-dependencies:
build-release:
stage: build
needs:
- build-docker-image
- build-dependencies
script:
- ci/build.sh --ci Release
Expand All @@ -70,7 +70,6 @@ build-release:
build-debug:
stage: build
needs:
- build-docker-image
- build-dependencies
script:
- ci/build.sh --ci Debug
Expand All @@ -82,7 +81,6 @@ build-debug:
unit-test-release:
stage: test
needs:
- build-docker-image
- build-release
- build-dependencies
script:
Expand All @@ -97,7 +95,6 @@ unit-test-release:
unit-test-debug:
stage: test
needs:
- build-docker-image
- build-debug
- build-dependencies
script:
Expand All @@ -112,7 +109,6 @@ unit-test-debug:
smoketest-test-release:
stage: test
needs:
- build-docker-image
- build-release
- build-dependencies
script:
Expand All @@ -125,7 +121,6 @@ smoketest-test-release:
smoketest-test-debug:
stage: test
needs:
- build-docker-image
- build-debug
- build-dependencies
script:
Expand All @@ -138,7 +133,6 @@ smoketest-test-debug:
code-lint:
stage: test
needs:
- build-docker-image
- build-release
- build-dependencies
script:
Expand All @@ -153,7 +147,6 @@ code-lint:
benchmark:
stage: test
needs:
- build-docker-image
- build-dependencies
- build-release
script:
Expand All @@ -169,7 +162,6 @@ code-coverage:
- "intelpt"
- "docker"
needs:
- build-docker-image
- build-release
- build-dependencies
script:
Expand All @@ -184,7 +176,6 @@ code-coverage:
publish-kpis:
stage: test
needs:
- build-docker-image
- build-release
- code-coverage
variables:
Expand All @@ -195,7 +186,6 @@ publish-kpis:
documentation:
stage: build
needs:
- build-docker-image
- build-release
- build-dependencies
script:
Expand Down
2 changes: 1 addition & 1 deletion cmake/project.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
set(SAMCONF_VERSION 0.75.11)
set(SAMCONF_VERSION 0.75.14)

# Attention: Aside from the version, as many things as possible in this file
# should be put into functions, as this solves potential issues with commands
Expand Down