/
config.yml
1027 lines (983 loc) · 31.8 KB
/
config.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (c) 2017-2018 Thomas Heller
# Copyright (c) 2015 Martin Stumpf
# Copyright (c) 2022-2024 Hartmut Kaiser
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
working_dir_default: &working_dir_default
working_directory: /hpx/build
docker_default: &docker_default
docker:
- image: stellargroup/build_env:14
defaults: &defaults
<<: *working_dir_default
<<: *docker_default
convert_xml: &convert_xml
name: Converting XML
when: always
command: |
mkdir -p ${CIRCLE_JOB}
xsltproc \
/hpx/conv.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml \
> ${CIRCLE_JOB}/Test.xml
move_core_dump: &move_core_dump
name: Moving core dumps
when: on_fail
command: |
mkdir -p ${CIRCLE_JOB}
# Ignore errors if there are no core dumps
cp core.* ${CIRCLE_JOB} || true
move_debug_log: &move_debug_log
name: Moving debug logs
when: on_fail
command: |
mkdir -p ${CIRCLE_JOB}
cp debug-log.txt ${CIRCLE_JOB} || true
gh_pages_filter: &gh_pages_filter
filters:
branches:
ignore:
- gh-pages
- trying
- staging
tags:
ignore: stable
docs_push_filter: &docs_push_filter
filters:
branches:
only:
- master
- /release.*/
tags:
ignore: stable
core_dependency: &core_dependency
requires:
- core
<<: *gh_pages_filter
additional_docs_filter: &additional_docs_filter
filters:
branches:
only:
- master
- /release.*/
tags:
ignore: stable
<<: *gh_pages_filter
add_github_to_known_hosts: &add_github_to_known_hosts
run:
name: Add Github's key(s) to known_hosts
command: |
mkdir -p ~/.ssh
ssh-keyscan -H github.com >>~/.ssh/known_hosts
configure_local_git: &configure_local_git
run:
name: Configure local Git
command: |
git config --global user.name "StellarBot"
git config --global user.email "contact@stellar-group.org"
version: 2
jobs:
checkout_code:
<<: *docker_default
working_directory: /hpx
steps:
- checkout:
path: /hpx/source-full
# Make a shallow clone of the current commit so that we don't have to copy
# the whole repository between work steps.
- run:
name: Creating shallow clone
command: |
git clone --depth=1 file:///hpx/source-full source
- run:
name: Downloading CTest XML to Junit XML
command: |
curl \
https://raw.githubusercontent.com/Kitware/CDash/master/app/cdash/tests/circle/conv.xsl \
--fail \
-o /hpx/conv.xsl
- persist_to_workspace:
root: /hpx
paths:
- ./source
- ./conv.xsl
# Check circular dependencies with cpp-dependencies tool
check_circular_deps:
<<: *working_dir_default
<<: *docker_default
steps:
- attach_workspace:
at: /hpx
- run:
name: Check circular dependencies with cpp-dependencies
command: |
# Ignore compatibility headers (the last cut -c3- is to remove a
# leading ./ in path names)
cpp-dependencies \
--dir /hpx/source/libs \
--ignore $(find /hpx/source/libs -type d -wholename '*/include_compatibility' | cut -d'/' -f5-) \
--graph-cycles /tmp/circular_deps.dot
dot /tmp/circular_deps.dot -Tsvg -o /tmp/circular_deps.svg
if [[ $(wc -l /tmp/circular_deps.dot | awk '{print $1}') -gt 2 ]]; then exit 1; fi
- store_artifacts:
path: /tmp/circular_deps.dot
destination: /hpx/artifacts/circular_deps.dot
- store_artifacts:
path: /tmp/circular_deps.svg
destination: /hpx/artifacts/circular_deps.svg
# Check if the files of the module are listed in the CMakeLists.txt
# Check if all the module dependencies are listed
check_module_cmakelists:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Check if the headers of the modules are listed in their CMakeLists.txt
command: |
/hpx/source/tools/check_module_cmakelists.sh
if [[ $(wc -l /tmp/missing_files.txt | awk '{print $1}') -gt 1 ]] \
|| [[ $(wc -l /tmp/missing_deps.txt | awk '{print $1}') -gt 1 ]]; \
then exit 1; fi
- store_artifacts:
path: /tmp/missing_files.txt
destination: /hpx/artifacts/missing_files.txt
- store_artifacts:
path: /tmp/missing_deps.txt
destination: /hpx/artifacts/missing_deps.txt
# Ensure that the modules stay clang-formatted
clang_format:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Check that the modules are well clang-formatted
command: |
cd /hpx/source/libs && shopt -s globstar # to activate the ** globbing
clang-format-11 --version
clang-format-11 -i **/*.{cpp,hpp}
cd /hpx/source/examples
clang-format-11 -i **/*.{cpp,hpp}
cd /hpx/source/tests
clang-format-11 -i **/*.{cpp,hpp}
git diff --exit-code > /tmp/modified_clang_format_files.txt
- store_artifacts:
path: /tmp/modified_clang_format_files.txt
destination: /hpx/artifacts/modified_clang_format_files.txt
# Ensure that CMake files stay cmake-formatted
cmake_format:
<<: *docker_default
steps:
- attach_workspace:
at: /hpx
- run:
name: Check that CMake files are well cmake-formatted
command: |
cd /hpx/source && shopt -s globstar # to activate the ** globbing
cmake-format --version
cmake-format -i **/*.cmake **/CMakeLists.txt
git diff --exit-code > /tmp/modified_cmake_format_files.txt
- store_artifacts:
path: /tmp/modified_cmake_format_files.txt
destination: /hpx/artifacts/modified_cmake_format_files.txt
configure:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Running CMake
command: |
cmake --version
if [ -z "$CIRCLE_PR_NUMBER" ] && \
( [ "$CIRCLE_BRANCH" == "master" ] || \
[[ "$CIRCLE_BRANCH" =~ ^release.* ]] || \
[ -n "$CIRCLE_TAG" ] ); then
DOCUMENTATION_OUTPUT_FORMATS="html;singlehtml;latexpdf"
else
DOCUMENTATION_OUTPUT_FORMATS="html"
fi
# Disable Vc for now as otherwise we need to reconfigure during the
# install step, which in turn forces everything to be rebuilt.
# -DHPX_WITH_DATAPAR_VC=On
cmake \
/hpx/source \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Debug \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_FETCH_ASIO=Off \
-DHPX_WITH_DATAPAR_BACKEND=VC \
-DHPX_WITH_GIT_COMMIT=${CIRCLE_SHA1} \
-DHPX_WITH_GIT_BRANCH="${CIRCLE_BRANCH}" \
-DHPX_WITH_GIT_TAG="${CIRCLE_TAG}" \
-DHPX_WITH_TOOLS=On \
-DCMAKE_CXX_FLAGS="-fcolor-diagnostics" \
-DHPX_WITH_TESTS_HEADERS=On \
-DHPX_WITH_COMPILER_WARNINGS=On \
-DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=On \
-DHPX_WITH_DEPRECATION_WARNINGS=On \
-DCMAKE_CXX_CLANG_TIDY=clang-tidy \
-DHPX_WITH_THREAD_LOCAL_STORAGE=On \
-DHPX_WITH_STACKTRACES_STATIC_SYMBOLS=On \
-DHPX_WITH_STACKTRACES_DEMANGLE_SYMBOLS=Off \
-DHPX_WITH_TESTS_DEBUG_LOG=On \
-DHPX_WITH_TESTS_DEBUG_LOG_DESTINATION=/hpx/build/debug-log.txt \
-DHPX_WITH_SPINLOCK_DEADLOCK_DETECTION=On \
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On \
-DHPX_LOGGING_WITH_SEPARATE_DESTINATIONS=Off \
-DHPX_WITH_THREAD_DEBUG_INFO=On \
-DHPX_COMMAND_LINE_HANDLING_WITH_JSON_CONFIGURATION_FILES=On \
-DHPX_WITH_FETCH_JSON=On \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \
-DHPX_WITH_DOCUMENTATION=On \
-DHPX_WITH_DOCUMENTATION_OUTPUT_FORMATS="${DOCUMENTATION_OUTPUT_FORMATS}" \
-DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-fifo
- persist_to_workspace:
root: /hpx
paths:
- ./build
configure_test_combinations:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Running CMake with tests on and examples off
command: |
cmake \
/hpx/source \
-G "Ninja" \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_FETCH_ASIO=Off \
-DHPX_WITH_TESTS=On \
-DHPX_WITH_EXAMPLES=Off
rm -rf *
- run:
name: Running CMake with tests off and examples on
command: |
cmake \
/hpx/source \
-G "Ninja" \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_FETCH_ASIO=Off \
-DHPX_WITH_TESTS=Off \
-DHPX_WITH_EXAMPLES=On
rm -rf *
- run:
name: Running CMake with APEX on
command: |
cmake \
/hpx/source \
-G "Ninja" \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_FETCH_ASIO=Off \
-DHPX_WITH_APEX=On \
-DHPX_WITH_FETCH_APEX=ON \
-DHPX_WITH_TESTS=On \
-DHPX_WITH_EXAMPLES=On
rm -rf *
- persist_to_workspace:
root: /hpx
paths:
- ./build
inspect:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Inspect Tool
command: |
ninja -j2 tools.inspect
- run:
name: Running Inspect Tool
command: |
./bin/inspect --all --output=./hpx_inspect_report.html /hpx/source
- run:
name: Convert inspect HTML output to XML
command: |
mkdir -p /report
/hpx/source/tools/inspect/inspect_to_junit.py \
./hpx_inspect_report.html \
/report/hpx_inspect.xml
when: always
- store_artifacts:
path: hpx_inspect_report.html
destination: hpx_inspect_report.html
- store_test_results:
path: /report
- persist_to_workspace:
root: /hpx
paths:
- ./build/bin/inspect
# We need a full clone here to be able to compare to master.
spellcheck:
<<: *defaults
steps:
- checkout:
path: /hpx/source
- run:
name: Running codespell
command: |
if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then
cd /hpx/source
codespell --version
codespell --ignore-words tools/.codespell_whitelist --skip='*.h5,*.png' $(git diff --name-only origin/master...) > /tmp/spelling_suggestions.txt
if [ -s /tmp/spelling_suggestions.txt ]; then exit 1; fi
else
echo "skipping spellcheck on non-PR build"
fi
when: always
- store_artifacts:
path: /tmp/spelling_suggestions.txt
destination: /hpx/artifacts/spelling_suggestions.txt
docs-html:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Sphinx Documentation (HTML)
command: |
ninja -j1 docs-html
no_output_timeout: 2h
- persist_to_workspace:
root: /hpx
paths:
- ./build
- store_artifacts:
path: /hpx/build/share/hpx/docs/html
depreport:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building HPX Dependency Report Tool
command: |
ninja -j2 tools.hpxdep
- run:
name: Building HPX Dependency Report Documentation
command: |
ninja -j1 depreport
no_output_timeout: 10m
- persist_to_workspace:
root: /hpx
paths:
- ./build/share/hpx/docs/report
- store_artifacts:
path: /hpx/build/share/hpx/docs/report
docs-singlehtml:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Sphinx Documentation (Single Page HTML)
command: |
ninja -j1 docs-singlehtml
no_output_timeout: 2h
- persist_to_workspace:
root: /hpx
paths:
- ./build/share/hpx/docs/singlehtml
- store_artifacts:
path: /hpx/build/share/hpx/docs/singlehtml
docs-latexpdf:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Sphinx Documentation (pdf)
command: |
ninja -j1 docs-latexpdf
no_output_timeout: 2h
- persist_to_workspace:
root: /hpx
paths:
- ./build/share/hpx/docs/latexpdf
- store_artifacts:
path: /hpx/build/share/hpx/docs/latexpdf/latex/HPX.pdf
docs_push:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- <<: *add_github_to_known_hosts
- <<: *configure_local_git
- run:
name: Pushing Sphinx Documentation
command: |
ninja -j1 git_docs
no_output_timeout: 1h
core:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Core
command: |
ninja -j2 -k 0 core
- persist_to_workspace:
root: /hpx
paths:
- ./build
tests.examples:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Examples
command: |
ninja -j2 -k 0 examples
- run:
name: Running Example Tests
when: always
command: |
ulimit -c unlimited
# NOTE: transpose_block_numa is disabled because
# hwloc_get_area_membind_nodeset (which is used by the
# numa_allocator) fails with EPERM.
ctest --timeout 60 -T test --no-compress-output --output-on-failure \
-R tests.examples \
-E tests.examples.transpose.transpose_block_numa
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.examples
- store_artifacts:
path: tests.examples
- persist_to_workspace:
root: /hpx
paths:
- ./build
tests.unit1.algorithms:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests (Algorithms, 1)
command: |
ninja -j1 -k 0 \
`grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit1.algorithms`
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
ctest \
--timeout 120 \
-T test \
--no-compress-output \
--output-on-failure \
--tests-regex \
`grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit1.algorithms | sed ':b;N;$!bb;s/\n/|/g'`
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit1.algorithms
- store_artifacts:
path: tests.unit1.algorithms
tests.unit2.algorithms:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests (Algorithms, 2)
command: |
ninja -j1 -k 0 \
`grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit2.algorithms`
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
ctest \
--timeout 120 \
-T test \
--no-compress-output \
--output-on-failure \
--tests-regex \
`grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit2.algorithms | sed ':b;N;$!bb;s/\n/|/g'`
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit2.algorithms
- store_artifacts:
path: tests.unit2.algorithms
tests.unit.container_algorithms:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests (Container Algorithms)
command: |
ninja -j2 -k 0 tests.unit.modules.algorithms.container_algorithms
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
ctest \
--timeout 120 \
-T test \
--no-compress-output \
--output-on-failure \
--tests-regex tests.unit.modules.algorithms.container_algorithms
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit.container_algorithms
- store_artifacts:
path: tests.unit.container_algorithms
tests.unit.segmented_algorithms:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests (Segmented Algorithms)
command: |
ninja -j1 -k 0 tests.unit.modules.segmented_algorithms
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
ctest \
--timeout 270 \
-T test \
--no-compress-output \
--output-on-failure \
--tests-regex tests.unit.modules.segmented_algorithms
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit.segmented_algorithms
- store_artifacts:
path: tests.unit.segmented_algorithms
tests.unit1:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests (1)
command: |
ninja -j2 -k 0 `grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit1.targets`
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
ctest \
--timeout 120 \
-T test \
--no-compress-output \
--output-on-failure \
--tests-regex `grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit1.targets | sed ':b;N;$!bb;s/\n/|/g'`
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit1
- store_artifacts:
path: tests.unit1
tests.unit2:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Unit Tests (2)
command: |
ninja -j2 -k 0 `grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit2.targets`
- run:
name: Running Unit Tests
when: always
command: |
ulimit -c unlimited
# NOTE: the numa_allocator test is disabled because
# hwloc_get_area_membind_nodeset used by it fails with EPERM.
ctest \
--timeout 120 \
-T test \
--no-compress-output \
--output-on-failure \
--tests-regex `grep -v -e ^# -e ^$ /hpx/source/.circleci/tests.unit2.targets | sed ':b;N;$!bb;s/\n/|/g'` \
--exclude-regex \
"tests.unit.modules.compute_local.numa_allocator|\
tests.unit.modules.resource_partitioner.scheduler_binding_check"
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.unit2
- store_artifacts:
path: tests.unit2
tests.regressions:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Regressions Tests
command: |
ninja -j2 -k 0 tests.regressions
- run:
name: Running Regressions Tests
when: always
command: |
ctest --timeout 60 -T test --no-compress-output --output-on-failure -R tests.regressions
- run:
<<: *convert_xml
- run:
<<: *move_core_dump
- run:
<<: *move_debug_log
- store_test_results:
path: tests.regressions
- store_artifacts:
path: tests.regressions
tests.headers1:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Header Tests (part 1)
command: |
ctest --timeout 60 -j1 -T test --no-compress-output --output-on-failure \
-R tests.headers \
-E "tests.headers.modules.[a-n].*"
- run:
<<: *convert_xml
- store_test_results:
path: tests.headers1
- store_artifacts:
path: tests.headers1
tests.headers2:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Header Tests (part 2)
command: |
ctest --timeout 60 -j1 -T test --no-compress-output --output-on-failure \
-R "tests.headers.modules.[a-c].*"
- run:
<<: *convert_xml
- store_test_results:
path: tests.headers2
- store_artifacts:
path: tests.headers2
tests.headers3:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Header Tests (part 3)
command: |
ctest --timeout 60 -j1 -T test --no-compress-output --output-on-failure \
-R "tests.headers.modules.[d-g].*"
- run:
<<: *convert_xml
- store_test_results:
path: tests.headers3
- store_artifacts:
path: tests.headers3
tests.headers4:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Header Tests (part 4)
command: |
ctest --timeout 60 -j1 -T test --no-compress-output --output-on-failure \
-R "tests.headers.modules.[h-n].*"
- run:
<<: *convert_xml
- store_test_results:
path: tests.headers4
- store_artifacts:
path: tests.headers4
tests.performance:
<<: *defaults
steps:
- attach_workspace:
at: /hpx
- run:
name: Building Performance Tests
command: |
ninja -j2 -k 0 tests.performance
install:
<<: *docker_default
environment:
TARGET_IMAGE_NAME: stellargroup/hpx:dev
steps:
- attach_workspace:
at: /hpx
- setup_remote_docker
- run:
name: Installing
command: |
./bin/hello_world_distributed --hpx:bind=none
# Disable Vc here as the target machine of the container image may
# not support the same vector intrinsics as this machine. The
# "Test Docker Image" below fails with "Illegal instruction" if VC
# is enabled, and other machines may fail similarly.
#
# Having to reconfigure here forces everything to be rebuilt, thus
# we disable it altogether.
#
# cmake \
# -DHPX_WITH_DATAPAR_VC=Off .
ninja -v -j2 install
working_directory: /hpx/build
when: always
no_output_timeout: 30m
- run:
name: Testing build unit tests
command: |
ninja -j2 tests.unit.build
working_directory: /hpx/build
when: always
- run:
name: Testing installed HPX
shell: /bin/bash
command: |
hello_world_distributed --hpx:bind=none
ldconfig
hpxcxx --exe=hello_world_distributed_test_build ../source/examples/quickstart/hello_world_distributed.cpp -g -lhpx_iostreamsd
./hello_world_distributed_test_build --hpx:bind=none
hpxrun.py -l 2 -t 1 ./hello_world_distributed_test_build -- --hpx:bind=none
working_directory: /hpx/build
no_output_timeout: 10m
when: always
- run:
name: Create Docker Image
command: |
cp /hpx/source/tools/docker/Dockerfile .
VER="18.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
docker build -t ${TARGET_IMAGE_NAME} .
working_directory: /usr/local
when: always
- run:
name: Test Docker Image
command: |
docker run ${TARGET_IMAGE_NAME} hello_world_distributed --hpx:bind=none
docker create -v /hpx --name sources stellargroup/hpx:dev /bin/true
docker cp ./source/examples/quickstart/hello_world_distributed.cpp sources:/hpx
docker run --volumes-from sources -w /hpx ${TARGET_IMAGE_NAME} \
hpxcxx --exe=hello_world_distributed_test_build \
hello_world_distributed.cpp -g -lhpx_iostreamsd
docker run --volumes-from sources -w /hpx ${TARGET_IMAGE_NAME} \
./hello_world_distributed_test_build --hpx:bind=none
docker run --volumes-from sources -w /hpx ${TARGET_IMAGE_NAME} \
hpxrun.py -l 2 -t 2 ./hello_world_distributed_test_build -- --hpx:bind=none
working_directory: /hpx
- <<: *add_github_to_known_hosts
- <<: *configure_local_git
- run:
name: Push Docker Image
command: |
if [[ -z "$CIRCLE_PR_NUMBER" ]] && [[ "$CIRCLE_BRANCH" == "master" ]]; then
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
docker push ${TARGET_IMAGE_NAME}
else
echo "Not on the master branch. The docker image will not be pushed."
fi
# This is the final step once everything else passes. We need a full clone
# here again to be able to push the new tag.
push_stable_tag:
<<: *docker_default
steps:
- checkout:
path: /hpx/source
- <<: *add_github_to_known_hosts
- <<: *configure_local_git
- run:
name: Push stable tag
command: |
if [[ -z "$CIRCLE_PR_NUMBER" ]] && [[ "$CIRCLE_BRANCH" == "master" ]]; then
# Tag the commit
cd /hpx/source
git tag -f stable
##########################################################
# NOTE: Dependency on the Docker push is so that users who
# use the Docker image would not be confused. Do not change
# the order before considering every use case.
##########################################################
# Remove the old tag
git push origin :refs/tags/stable
# Push the new stable commit tag
git push origin stable
else
echo "Not on the master branch. The commit will not be tagged."
fi
workflows:
version: 2
build-and-test:
jobs:
- checkout_code:
<<: *gh_pages_filter
- check_circular_deps:
requires:
- checkout_code
<<: *gh_pages_filter
- check_module_cmakelists:
requires:
- checkout_code
<<: *gh_pages_filter
- clang_format:
requires:
- checkout_code
<<: *gh_pages_filter
- cmake_format:
requires:
- checkout_code
<<: *gh_pages_filter
- configure:
requires:
- checkout_code
<<: *gh_pages_filter
- configure_test_combinations:
requires:
- checkout_code
<<: *gh_pages_filter
- inspect:
requires:
- configure
<<: *gh_pages_filter
- spellcheck:
<<: *gh_pages_filter
- core:
requires:
- configure
<<: *gh_pages_filter
- tests.examples:
<<: *core_dependency
- tests.unit1.algorithms:
<<: *core_dependency
- tests.unit2.algorithms:
<<: *core_dependency
- tests.unit.container_algorithms:
<<: *core_dependency
- tests.unit.segmented_algorithms:
<<: *core_dependency
- tests.unit1:
<<: *core_dependency
- tests.unit2:
<<: *core_dependency
- tests.regressions:
<<: *core_dependency
- tests.performance:
<<: *core_dependency
- tests.headers1:
<<: *core_dependency
- tests.headers2:
<<: *core_dependency
- tests.headers3:
<<: *core_dependency
- tests.headers4:
<<: *core_dependency
- docs-html:
requires:
- configure
# Force docs to be built after examples so that workspace doesn't
# have conflicts
- tests.examples
<<: *gh_pages_filter
- depreport:
requires:
- configure
<<: *gh_pages_filter
- docs-singlehtml:
requires:
- configure
# Force docs to be built after examples so that workspace doesn't
# have conflicts
- tests.examples
<<: *additional_docs_filter
- docs-latexpdf:
requires:
- configure
# Force docs to be built after examples so that workspace doesn't
# have conflicts
- tests.examples
<<: *additional_docs_filter
- docs_push:
requires:
- docs-html
- docs-singlehtml
- docs-latexpdf
- depreport
<<: *docs_push_filter
- install: