-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
62 lines (57 loc) · 2.57 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Turning off SAST as it doesn't seem to work on the internal instance
#include:
# - template: Security/SAST.gitlab-ci.yml
# Only run pipelines for:
# - merge requests (to any target branch)
# - tags
# - pushes to master or questa branches
# Do not run pipelines for forks
workflow:
rules:
# ETP: Allow pipelines to run for forks by commenting this out
#- if: $CI_PROJECT_NAMESPACE != "tensors" && $CI_PROJECT_NAMESPACE != "etphipp"
# when: never
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "questa"
variables:
GIT_STRATEGY: clone
SAST_EXCLUDED_PATHS: "tpls"
stages:
- build
- test
# Build genten (w/clang) and push to registry using docker-in-docker
build-gitlab-clang-image:
stage: build
#image: docker:stable
image: docker:25
services:
#- docker:stable-dind
- docker:25-dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull ${CI_REGISTRY_IMAGE}/genten-clang-openmp-snb:latest || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}/genten-clang-openmp-snb:latest -t genten-clang-openmp-snb:latest --build-arg ARCH=SNB -f docker/Dockerfile_clang_openmp_image .
- docker run --name gt -w /build/genten -t genten-clang-openmp-snb:latest ctest -VV
- docker tag genten-clang-openmp-snb:latest ${CI_REGISTRY_IMAGE}/genten-clang-openmp-snb:latest
- docker push ${CI_REGISTRY_IMAGE}/genten-clang-openmp-snb:latest
- docker rmi ${CI_REGISTRY_IMAGE}/genten-clang-openmp-snb:latest
rules:
- if: $CI_SERVER_HOST == "gitlab.com"
# Build genten (w/gcc) and push to registry using docker-in-docker
# Turning this build off since it seems to just hang when building gcp
.build-gitlab-gcc-image:
stage: build
image: docker:stable
services:
- docker:stable-dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull ${CI_REGISTRY_IMAGE}/genten-gcc-openmpi-openmp-snb:latest || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}/genten-gcc-openmpi-openmp-snb:latest -t genten-gcc-openmpi-openmp-snb:latest --build-arg ARCH=SNB -f docker/Dockerfile_gcc_openmp_image .
- docker run --name gt -w /build/genten -t genten-gcc-openmpi-openmp-snb:latest ctest
- docker tag genten-gcc-openmpi-openmp-snb:latest ${CI_REGISTRY_IMAGE}/genten-gcc-openmpi-openmp-snb:latest
- docker push ${CI_REGISTRY_IMAGE}/genten-gcc-openmpi-openmp-snb:latest
- docker rmi ${CI_REGISTRY_IMAGE}/genten-gcc-openmpi-openmp-snb:latest
rules:
- if: $CI_SERVER_HOST == "gitlab.com"