forked from mclarsen/genten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
156 lines (146 loc) · 4.47 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# 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:
- 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
stages:
- build
# Clang build for internal repo
# Disabling because internal runner isn't reliably picking up jobs
.build-clang:
stage: build
tags:
- clang
script:
- cd ..
- rm -rf build_clang
- mkdir build_clang
- cd build_clang
- source ../genten/scripts/sems_clang/setup_env.sh
- ../genten/scripts/sems_clang/do_configure.sh
- make -j32
- ctest
rules:
- if: $CI_SERVER_HOST == "cee-gitlab.sandia.gov"
# Gcc build for internal repo
# Disabling because internal runner isn't reliably picking up jobs
.build-gcc:
stage: build
tags:
- gcc
script:
- cd ..
- rm -rf build_gcc
- mkdir build_gcc
- cd build_gcc
- source ../genten/scripts/sems_gcc/setup_env.sh
- ../genten/scripts/sems_gcc/do_configure.sh
- make -j32
- ctest
rules:
- if: $CI_SERVER_HOST == "cee-gitlab.sandia.gov"
# Intel build for internal repo
# Disabling because internal runner isn't reliably picking up jobs
.build-intel:
stage: build
tags:
- intel
script:
- cd ..
- rm -rf build_intel
- mkdir build_intel
- cd build_intel
- source ../genten/scripts/sems_intel/setup_env.sh
- ../genten/scripts/sems_intel/do_configure.sh
- make -j32
- ctest
rules:
- if: $CI_SERVER_HOST == "cee-gitlab.sandia.gov"
# Cuda-kepler build for internal repo
# Disabling because internal runner isn't reliably picking up jobs
.build-cuda-kepler:
stage: build
tags:
- cuda_kepler
script:
- cd ..
- rm -rf build_cuda_kepler
- mkdir build_cuda_kepler
- cd build_cuda_kepler
- source ../genten/scripts/elbert_cuda_kepler/setup_env.sh
- ../genten/scripts/elbert_cuda_kepler/do_configure.sh
- make -j32
- ctest
rules:
- if: $CI_SERVER_HOST == "cee-gitlab.sandia.gov"
# Gcc build for external repo (run manually and is optional)
build-gitlab-gcc:
stage: build
image: registry.gitlab.com/tensors/genten/build_gnu_clang:latest
script:
- cd ..
- rm -rf build_gitlab_gcc
- mkdir build_gitlab_gcc
- cd build_gitlab_gcc
- ../genten/scripts/gitlab_gcc/do_configure.sh
- make -j4
- ctest
rules:
- if: $CI_SERVER_HOST == "gitlab.com"
when: manual
allow_failure: true
# Clang build for external repo (run manually and is optional)
build-gitlab-clang:
stage: build
image: registry.gitlab.com/tensors/genten/build_gnu_clang:latest
script:
- cd ..
- rm -rf build_gitlab_clang
- mkdir build_gitlab_clang
- cd build_gitlab_clang
- ../genten/scripts/gitlab_clang/do_configure.sh
- make -j4
- ctest
rules:
- if: $CI_SERVER_HOST == "gitlab.com"
when: manual
allow_failure: true
# Build genten (w/clang) and push to registry using docker-in-docker
build-gitlab-clang-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:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -t genten:latest --build-arg ARCH=SNB -f docker/Dockerfile_clang_openmp_image .
- docker run --name gt -w /build/genten -t genten:latest ctest
- docker tag genten:latest $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
- docker rmi $CI_REGISTRY_IMAGE:latest
rules:
- if: $CI_SERVER_HOST == "gitlab.com"
# Build genten (w/clang) and push to registry using podman
# Disable this for now because the runner seems to not be working
.build-clang-image:
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest -t genten:latest --format=docker --build-arg ARCH=SNB -f docker/Dockerfile_clang_openmp_image .
- docker run --name gt -w /build/genten -t genten:latest ctest
- docker tag genten:latest $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
- docker rmi $CI_REGISTRY_IMAGE:latest
rules:
- if: $CI_SERVER_HOST == "cee-gitlab.sandia.gov"