-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
codefresh.yml
177 lines (176 loc) · 4.44 KB
/
codefresh.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
version: '1.0'
stages:
- checkout
- build
- prepare
- build_all_unit_tests
- build_other_unit_tests
- run_tests
- benchmark
steps:
main_clone:
title: Cloning main repository...
type: git-clone
stage: checkout
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_REVISION}}'
when: &skip_condition
condition:
all:
noSkipCiInCommitMessage1: 'includes(lower("${{CF_COMMIT_MESSAGE}}"), "skip ci") == false'
noSkipCiInCommitMessage2: 'includes(lower("${{CF_COMMIT_MESSAGE}}"), "ci skip") == false'
BuildingDockerImage:
title: Building Docker Image
stage: build
type: build
image_name: srzzumix/iutest_dev_env
working_directory: ./
tag: '${{CF_BRANCH_TAG_NORMALIZED}}'
dockerfile: ./tools/docker/Dockerfile
registry: dockerhub
when: *skip_condition
PrepareUnitTests:
title: Prepare
stage: prepare
image: gcc:9
commands:
- cf_export GGC_MIN_EXPAND=4
- cf_export GGC_MIN_HEAPSIZ=32768
- cf_export CI_NODEBUG=1
- cf_export NO_TESTDATA=1
- make -C test clean
- make -C test prepare
when: *skip_condition
BuildAllUnitTests:
type: parallel
stage: build_all_unit_tests
when: *skip_condition
steps:
BuildAllUnitTest_gcc9: &build_all_unit_test
title: Build Basic all_tests - gcc9
image: gcc:9
environment:
- OUTDIR=gcc9
commands:
- rm -rf test/${OUTDIR} || true
- mkdir test/${OUTDIR}
- make -C test all_tests_build
BuildAllUnitTest_gcc8:
<<: *build_all_unit_test
title: Build Basic all_tests - gcc8
image: gcc:8
environment:
- OUTDIR=gcc8
# BuildAllUnitTest_gcc7:
# <<: *build_all_unit_test
# title: Build Basic all_tests - gcc7
# image: gcc:7
# environment:
# - OUTDIR=gcc7
BuildOtherUnitTests:
type: parallel
stage: build_other_unit_tests
steps:
BuildOtherUnitTest_gcc9: &build_other_unit_tests
image: gcc:9
environment:
- OUTDIR=gcc9
commands:
- make -C test
when:
steps:
- name: BuildAllUnitTest_gcc9
on:
- success
BuildOtherUnitTest_gcc8:
<<: *build_other_unit_tests
image: gcc:8
environment:
- OUTDIR=gcc8
when:
steps:
- name: BuildAllUnitTest_gcc8
on:
- success
# BuildOtherUnitTest_gcc7:
# <<: *build_other_unit_tests
# image: gcc:7
# environment:
# - OUTDIR=gcc7
# when:
# steps:
# - name: BuildAllUnitTest_gcc7
# on:
# - success
RunTests:
type: parallel
stage: run_tests
steps:
RunTest_gcc9: &run_test
image: gcc:9
environment:
- OUTDIR=gcc9
commands:
- make -C test test && make -C test report
when:
steps:
- name: BuildOtherUnitTest_gcc9
on:
- success
RunTest_gcc8:
<<: *run_test
image: gcc:8
environment:
- OUTDIR=gcc8
when:
steps:
- name: BuildOtherUnitTest_gcc8
on:
- success
# RunTest_gcc7:
# <<: *run_test
# image: gcc:7
# environment:
# - OUTDIR=gcc7
# when:
# steps:
# - name: BuildOtherUnitTest_gcc7
# on:
# - success
Benchmark:
title: Running Benchmark Tests
stage: benchmark
image: '${{BuildingDockerImage}}'
working_directory: IMAGE_WORK_DIR
entry_point:
- /bin/sh
- /codefresh/volume/cf-generated/unit_test_script
create_file:
path: /codefresh/volume/cf-generated
name: unit_test_script
content: |-
cd /codefresh/volume/iutest
cd test
make -C benchmark
make bench
when:
steps:
- name: RunningUnitTest_gcc9
on:
- success
- name: RunningUnitTest_gcc8
on:
- success
# - name: RunningUnitTest_gcc7
# on:
# - success
on_success:
metadata:
set:
- '${{BuildingDockerImage.imageId}}':
- CF_QUALITY: true
on_fail:
metadata:
set:
- '${{BuildingDockerImage.imageId}}':
- CF_QUALITY: false