11workflow :
22 rules :
3- - if : $CI_PIPELINE_SOURCE == "merge_request_event"
4- when : always
5- - if : $CI_PIPELINE_SOURCE == "schedule"
6- when : always
7- - if : $CI_PIPELINE_SOURCE == "web"
8- when : always
9- - when : never
3+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
4+ when : always
5+ - if : $CI_PIPELINE_SOURCE == "schedule"
6+ when : always
7+ - if : $CI_PIPELINE_SOURCE == "web"
8+ when : always
9+ - when : never
1010
1111variables :
12- ANOD_DEFAULT_SANDBOX_DIR : /it/wave
13- HOST : x86_64-linux
12+ ANOD_DEFAULT_SANDBOX_DIR : /it/wave
13+ HOST : x86_64-linux
1414
1515stages :
16- - build
16+ - build
1717
1818default :
1919 before_script : |
@@ -61,8 +61,8 @@ default:
6161
6262.job_template :
6363 services :
64- - image:pe-base
65- - cpu:4
64+ - image:pe-base
65+ - cpu:4
6666 interruptible : true
6767
6868# #######
@@ -71,108 +71,92 @@ default:
7171
7272build_doc :
7373 services :
74- - image:pe-base
75- - cpu:2
74+ - image:pe-base
75+ - cpu:2
7676 stage : build
7777 script :
78- - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
79- - anod build --latest gnatcoll-core-doc
80- - mv $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/gnatcoll-core-doc/install doc-build
78+ - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
79+ - anod build --latest gnatcoll-core-doc
80+ - mv $ANOD_DEFAULT_SANDBOX_DIR/x86_64-linux/gnatcoll-core-doc/install doc-build
8181 artifacts :
82- when :
83- always
82+ when : always
8483 paths :
85- - doc-build
84+ - doc-build
8685
8786build_and_test_windows :
8887 services :
89- - image:e3-windows-2022
90- - platform:x86_64-windows-2022
91- - cpu:2
92- - mem:8
93- - disk:100
88+ - image:e3-windows-2022
89+ - platform:x86_64-windows-2022
90+ - cpu:2
91+ - mem:8
92+ - disk:100
9493 stage : build
9594 script :
96- - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
97- - anod build --latest gnatcoll-core
98- - anod test --latest gnatcoll-core -Qexternal
99- - working_dir=$(anod info test gnatcoll-core --show working_dir -Qexternal)
100- - results_dir=$working_dir/results/new
101- - e3-testsuite-report
102- --failure-exit-code 1
103- --xunit-output $CI_PROJECT_DIR/test.xml
104- --xunit-name gnatcoll-core
105- $results_dir || FAILED=true
106-
107- # We previously prevented the pipeline from halting if a test failed, to make
108- # sure all tests were run. If a test failed now we exit with a non-zero code
109- - if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
95+ - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
96+ - anod build --latest gnatcoll-core
97+ - anod test --latest gnatcoll-core -Qexternal
98+ - working_dir=$(anod info test gnatcoll-core --show working_dir -Qexternal)
99+ - results_dir=$working_dir/results/new
100+ - e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $results_dir || FAILED=true
101+
102+ # We previously prevented the pipeline from halting if a test failed, to make
103+ # sure all tests were run. If a test failed now we exit with a non-zero code
104+ - if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
110105 allow_failure : true
111106 artifacts :
112- when :
113- always
107+ when : always
114108 paths :
115- - test.xml
109+ - test.xml
116110 reports :
117111 junit : test.xml
118112
119113build_and_test_aarch64_linux :
120114 services :
121- - image:e3-aarch64-linux
122- - cpu:4
123- - platform:aarch64-linux
115+ - image:e3-aarch64-linux
116+ - cpu:4
117+ - platform:aarch64-linux
124118 stage : build
125119 script :
126- - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
127- - anod build --latest gnatcoll-core
128- - anod test --latest gnatcoll-core -Qexternal
129- - e3-testsuite-report
130- --failure-exit-code 1
131- --xunit-output $CI_PROJECT_DIR/test.xml
132- --xunit-name gnatcoll-core
133- $ANOD_DEFAULT_SANDBOX_DIR/aarch64-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
134-
135- # We previously prevented the pipeline from halting if a test failed, to make
136- # sure all tests were run. If a test failed now we exit with a non-zero code
137- - if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
120+ - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
121+ - anod build --latest gnatcoll-core
122+ - anod test --latest gnatcoll-core -Qexternal
123+ - e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $ANOD_DEFAULT_SANDBOX_DIR/aarch64-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
124+
125+ # We previously prevented the pipeline from halting if a test failed, to make
126+ # sure all tests were run. If a test failed now we exit with a non-zero code
127+ - if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
138128 allow_failure : true
139129 artifacts :
140- when :
141- always
130+ when : always
142131 paths :
143- - test.xml
132+ - test.xml
144133 reports :
145134 junit : test.xml
146135
147136build_debug_mode_x86_64_linux :
148137 extends : .job_template
149138 stage : build
150139 script :
151- - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
152- - anod build --latest gnatcoll-core -Qdbg
140+ - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
141+ - anod build --latest gnatcoll-core -Qdbg
153142
154143build_and_test_x86_linux :
155144 extends : .job_template
156145 stage : build
157146 script :
158- - cp /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86_64-linux /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86-linux
159- - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
160- - anod build --latest --build=x86-linux gnatcoll-core
161- - anod test --latest --build=x86-linux gnatcoll-core -Qexternal
162- - e3-testsuite-report
163- --failure-exit-code 1
164- --xunit-output $CI_PROJECT_DIR/test.xml
165- --xunit-name gnatcoll-core
166- $ANOD_DEFAULT_SANDBOX_DIR/x86-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
167-
168- # We previously prevented the pipeline from halting if a test failed, to make
169- # sure all tests were run. If a test failed now we exit with a non-zero code
170- - if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
147+ - cp /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86_64-linux /it/e3/lib/python3.12/site-packages/e3/os/data/rlimit-x86-linux
148+ - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
149+ - anod build --latest --build=x86-linux gnatcoll-core
150+ - anod test --latest --build=x86-linux gnatcoll-core -Qexternal
151+ - e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test.xml --xunit-name gnatcoll-core $ANOD_DEFAULT_SANDBOX_DIR/x86-linux/gnatcoll-core_external_test/results/new/ || FAILED=true
152+
153+ # We previously prevented the pipeline from halting if a test failed, to make
154+ # sure all tests were run. If a test failed now we exit with a non-zero code
155+ - if [ "$FAILED" = "true" ]; then echo "There was at least one testcase failure" && exit 1; fi
171156 artifacts :
172- when :
173- always
157+ when : always
174158 paths :
175- - test.xml
159+ - test.xml
176160 reports :
177161 junit : test.xml
178162
@@ -220,49 +204,44 @@ build_and_test_coverage:
220204 extends : .job_template
221205 stage : build
222206 script :
223- - anybadge -l Coverage -v "Under Construction" -f coverage.svg -c steelblue
224- - anybadge -l "Tests Passing" -v "Error" -f test-count.svg -c red
225-
226- - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
227- - anod build --latest gnatcoll-core -Qcoverage
228- - anod test --latest gnatcoll-core -Qcoverage
229-
230- - e3-testsuite-report
231- --failure-exit-code 1
232- --xunit-output $CI_PROJECT_DIR/test-coverage.xml
233- --xunit-name gnatcoll-core
234- $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/ || FAILED=true
235-
236- # Create test count badge
237- - cd $CI_PROJECT_DIR
238- - rm test-count.svg # remove placeholder error badge
239- - create_xunit_badge --xunit_reports test-coverage.xml
240-
241- # Move coverage reports and log coverage summaries
242- - mkdir $CI_PROJECT_DIR/coverage
243- - mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-xml $CI_PROJECT_DIR/coverage/xml
244- - mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-dhtml $CI_PROJECT_DIR/coverage/dhtml
245- - mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-cobertura $CI_PROJECT_DIR/coverage/cobertura
246- - echo_coverage_stats --coverage-file $CI_PROJECT_DIR/coverage/xml/index.xml
247-
248- - publish-pages ./coverage/dhtml/ --job
249-
250- # We previously prevented the pipeline from halting if a test failed, to make
251- # sure all tests were run. If a test failed now we exit with a non-zero code
252- - if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
207+ - anybadge -l Coverage -v "Under Construction" -f coverage.svg -c steelblue
208+ - anybadge -l "Tests Passing" -v "Error" -f test-count.svg -c red
209+
210+ - anod vcs --add-repo gnatcoll-core $CI_PROJECT_DIR
211+ - anod build --latest gnatcoll-core -Qcoverage
212+ - anod test --latest gnatcoll-core -Qcoverage
213+
214+ - e3-testsuite-report --failure-exit-code 1 --xunit-output $CI_PROJECT_DIR/test-coverage.xml --xunit-name gnatcoll-core $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/ || FAILED=true
215+
216+ # Create test count badge
217+ - cd $CI_PROJECT_DIR
218+ - rm test-count.svg # remove placeholder error badge
219+ - create_xunit_badge --xunit_reports test-coverage.xml
220+
221+ # Move coverage reports and log coverage summaries
222+ - mkdir $CI_PROJECT_DIR/coverage
223+ - mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-xml $CI_PROJECT_DIR/coverage/xml
224+ - mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-dhtml $CI_PROJECT_DIR/coverage/dhtml
225+ - mv $ANOD_DEFAULT_SANDBOX_DIR/$HOST/gnatcoll-core_coverage_test/results/new/coverage-cobertura $CI_PROJECT_DIR/coverage/cobertura
226+ - echo_coverage_stats --coverage-file $CI_PROJECT_DIR/coverage/xml/index.xml
227+
228+ - publish-pages ./coverage/dhtml/ --job
229+
230+ # We previously prevented the pipeline from halting if a test failed, to make
231+ # sure all tests were run. If a test failed now we exit with a non-zero code
232+ - if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
253233 coverage : ' /^Stmt Coverage:\s+(\d+\.\d+\%) \(\d+ \/ \d+\)$/'
254234 allow_failure : true
255235 artifacts :
256- when :
257- always
236+ when : always
258237 paths :
259- - $PACKAGE
260- - test-coverage.xml
261- - coverage.svg
262- - test-count.svg
263- - coverage/xml
264- - coverage/dhtml
265- - coverage/cobertura
238+ - $PACKAGE
239+ - test-coverage.xml
240+ - coverage.svg
241+ - test-count.svg
242+ - coverage/xml
243+ - coverage/dhtml
244+ - coverage/cobertura
266245 reports :
267246 junit : test-coverage.xml
268247 coverage_report :
0 commit comments