Skip to content

Commit 7c91e18

Browse files
committed
Update changelog and fix CI jobs failing on heavy builds
1 parent 921c6f7 commit 7c91e18

9 files changed

Lines changed: 541 additions & 377 deletions

File tree

.github/workflows/clang.yml

Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ jobs:
5353
submodules: recursive
5454
fetch-depth: 0
5555
- run: git config --system --add safe.directory '*'
56-
- run: c4core-install ${{matrix.cxx}}
56+
- run: |
57+
# retry if it fails
58+
c4core-install ${{matrix.cxx}} \
59+
|| c4core-install ${{matrix.cxx}} \
60+
|| c4core-install ${{matrix.cxx}}
5761
- name: show info
5862
run: source .github/setenv.sh && c4_show_info
5963
- name: shared64-configure---------------------------------------------------
@@ -124,7 +128,11 @@ jobs:
124128
submodules: recursive
125129
fetch-depth: 0
126130
- run: git config --system --add safe.directory '*'
127-
- run: c4core-install ${{matrix.cxx}}
131+
- run: |
132+
# retry if it fails
133+
c4core-install ${{matrix.cxx}} \
134+
|| c4core-install ${{matrix.cxx}} \
135+
|| c4core-install ${{matrix.cxx}}
128136
- name: show info
129137
run: source .github/setenv.sh && c4_show_info
130138
- name: shared64-configure---------------------------------------------------
@@ -195,7 +203,11 @@ jobs:
195203
submodules: recursive
196204
fetch-depth: 0
197205
- run: git config --system --add safe.directory '*'
198-
- run: c4core-install ${{matrix.cxx}}
206+
- run: |
207+
# retry if it fails
208+
c4core-install ${{matrix.cxx}} \
209+
|| c4core-install ${{matrix.cxx}} \
210+
|| c4core-install ${{matrix.cxx}}
199211
- name: show info
200212
run: source .github/setenv.sh && c4_show_info
201213
- name: shared64-configure---------------------------------------------------
@@ -266,7 +278,11 @@ jobs:
266278
submodules: recursive
267279
fetch-depth: 0
268280
- run: git config --system --add safe.directory '*'
269-
- run: c4core-install ${{matrix.cxx}}
281+
- run: |
282+
# retry if it fails
283+
c4core-install ${{matrix.cxx}} \
284+
|| c4core-install ${{matrix.cxx}} \
285+
|| c4core-install ${{matrix.cxx}}
270286
- name: show info
271287
run: source .github/setenv.sh && c4_show_info
272288
- name: shared64-configure---------------------------------------------------
@@ -579,7 +595,16 @@ jobs:
579595
-DRYML_DBG=OFF
580596
- name: 'build Debug ::: -m${{matrix.bits}}'
581597
run: |
582-
cmake --build build/Debug --target ryml-test-build --parallel --verbose
598+
numprocs=`_c4getnumcores`
599+
if [ -n "0"] ; then
600+
if [ "0" == "1" ] ; then
601+
if (( $numprocs > 1 )) ; then
602+
numprocs=$(($numprocs / 2))
603+
fi
604+
fi
605+
fi
606+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
607+
cmake --build build/Debug --target ryml-test-build --parallel $numprocs --verbose
583608
- name: 'run Debug ::: -m${{matrix.bits}}'
584609
run: |
585610
source .github/setenv.sh
@@ -607,7 +632,16 @@ jobs:
607632
-DRYML_DBG=OFF
608633
- name: 'build Release ::: -O1 -DNDEBUG -m${{matrix.bits}}'
609634
run: |
610-
cmake --build build/Release --target ryml-test-build --parallel --verbose
635+
numprocs=`_c4getnumcores`
636+
if [ -n "0"] ; then
637+
if [ "0" == "1" ] ; then
638+
if (( $numprocs > 1 )) ; then
639+
numprocs=$(($numprocs / 2))
640+
fi
641+
fi
642+
fi
643+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
644+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
611645
- name: 'run Release ::: -O1 -DNDEBUG -m${{matrix.bits}}'
612646
run: |
613647
source .github/setenv.sh
@@ -635,7 +669,16 @@ jobs:
635669
-DRYML_DBG=OFF
636670
- name: 'build Release ::: -O2 -DNDEBUG -m${{matrix.bits}}'
637671
run: |
638-
cmake --build build/Release --target ryml-test-build --parallel --verbose
672+
numprocs=`_c4getnumcores`
673+
if [ -n "0"] ; then
674+
if [ "0" == "1" ] ; then
675+
if (( $numprocs > 1 )) ; then
676+
numprocs=$(($numprocs / 2))
677+
fi
678+
fi
679+
fi
680+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
681+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
639682
- name: 'run Release ::: -O2 -DNDEBUG -m${{matrix.bits}}'
640683
run: |
641684
source .github/setenv.sh
@@ -663,7 +706,16 @@ jobs:
663706
-DRYML_DBG=OFF
664707
- name: 'build Release ::: -O3 -DNDEBUG -m${{matrix.bits}}'
665708
run: |
666-
cmake --build build/Release --target ryml-test-build --parallel --verbose
709+
numprocs=`_c4getnumcores`
710+
if [ -n "0"] ; then
711+
if [ "0" == "1" ] ; then
712+
if (( $numprocs > 1 )) ; then
713+
numprocs=$(($numprocs / 2))
714+
fi
715+
fi
716+
fi
717+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
718+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
667719
- name: 'run Release ::: -O3 -DNDEBUG -m${{matrix.bits}}'
668720
run: |
669721
source .github/setenv.sh
@@ -691,7 +743,16 @@ jobs:
691743
-DRYML_DBG=OFF
692744
- name: 'build Release ::: -Os -DNDEBUG -m${{matrix.bits}}'
693745
run: |
694-
cmake --build build/Release --target ryml-test-build --parallel --verbose
746+
numprocs=`_c4getnumcores`
747+
if [ -n "0"] ; then
748+
if [ "0" == "1" ] ; then
749+
if (( $numprocs > 1 )) ; then
750+
numprocs=$(($numprocs / 2))
751+
fi
752+
fi
753+
fi
754+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
755+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
695756
- name: 'run Release ::: -Os -DNDEBUG -m${{matrix.bits}}'
696757
run: |
697758
source .github/setenv.sh
@@ -788,7 +849,11 @@ jobs:
788849
submodules: recursive
789850
fetch-depth: 0
790851
- run: git config --system --add safe.directory '*'
791-
- run: c4core-install ${{matrix.cxx}}
852+
- run: |
853+
# retry if it fails
854+
c4core-install ${{matrix.cxx}} \
855+
|| c4core-install ${{matrix.cxx}} \
856+
|| c4core-install ${{matrix.cxx}}
792857
- name: show info
793858
run: source .github/setenv.sh && c4_show_info
794859
- name: shared64-configure---------------------------------------------------

.github/workflows/coverage.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ jobs:
4343
- std: 11
4444
namesfx: 64bit_dbg
4545
cmk: -DCMAKE_CXX_FLAGS=-m64 -DRYML_DBG=ON
46+
halfprocs: 'yes'
4647
- std: 11
4748
namesfx: 32bit
4849
cmk: -DCMAKE_CXX_FLAGS=-m32
50+
halfprocs: 'yes'
4951
env:
5052
GCC_VERSION: 13
5153
LCOV_ARGS: -v --ignore-errors mismatch,mismatch --ignore-errors unused,unused
@@ -59,11 +61,11 @@ jobs:
5961
fetch-depth: 0
6062
- name: install compiler
6163
run: |
62-
if [[ ${{matrix}} == *"32"* ]] ; then
64+
if [[ ${{matrix.namesfx}} == *"32"* ]] ; then
6365
sudo dpkg --add-architecture i386
6466
fi
6567
sudo apt-get update
66-
if [[ ${{matrix}} == *"32"* ]] ; then
68+
if [[ ${{matrix.namesfx}} == *"32"* ]] ; then
6769
sudo apt-get install -y \
6870
linux-libc-dev:i386 \
6971
libc6:i386 \
@@ -75,8 +77,11 @@ jobs:
7577
cmake \
7678
git \
7779
lcov \
78-
g++-$GCC_VERSION \
80+
g++-$GCC_VERSION
81+
if [[ ${{matrix.namesfx}} == *"32"* ]] ; then
82+
sudo apt-get install -y \
7983
g++-$GCC_VERSION-multilib
84+
fi
8085
- name: show info
8186
run: source .github/setenv.sh && c4_show_info
8287
- name: configure
@@ -89,7 +94,15 @@ jobs:
8994
${{matrix.cmk}}
9095
- name: build
9196
run: |
92-
cmake --build build/$BUILD_ID --verbose --target ryml-test-build --parallel
97+
numprocs=`nproc`
98+
if [ -n "${{matrix.halfprocs}}" ] ; then
99+
if (( $numprocs > 1 )) ; then
100+
numprocs=$(($numprocs / 2))
101+
fi
102+
fi
103+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
104+
cmake --build build/$BUILD_ID --verbose --target ryml-test-build \
105+
--parallel $numprocs
93106
- name: run
94107
run: |
95108
export CTEST_PARALLEL_LEVEL=`nproc`

.github/workflows/coverage.ys

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
- {std: 11, namesfx: 64bit_nocb , cmk: "-DCMAKE_CXX_FLAGS=-m64 -DRYML_DEFAULT_CALLBACKS=OFF"}
1818
- {std: 11, namesfx: 64bit_noexc, cmk: "-DCMAKE_CXX_FLAGS='-m64 -fno-exceptions -fno-rtti'"}
1919
- {std: 11, namesfx: 64bit_exc , cmk: "-DCMAKE_CXX_FLAGS='-m64' -DRYML_DEFAULT_CALLBACK_USES_EXCEPTIONS=ON"}
20-
- {std: 11, namesfx: 64bit_dbg , cmk: "-DCMAKE_CXX_FLAGS=-m64 -DRYML_DBG=ON"}
21-
- {std: 11, namesfx: 32bit , cmk: "-DCMAKE_CXX_FLAGS=-m32"}
20+
- {std: 11, namesfx: 64bit_dbg , cmk: "-DCMAKE_CXX_FLAGS=-m64 -DRYML_DBG=ON", halfprocs: yes}
21+
- {std: 11, namesfx: 32bit , cmk: "-DCMAKE_CXX_FLAGS=-m32", halfprocs: yes}
2222
#- {std: 11, namesfx: 32bit_dbg , cmk: "-DCMAKE_CXX_FLAGS=-m32 -DRYML_DBG=ON"}
2323
env:
2424
GCC_VERSION: 13 # the default compiler
@@ -29,11 +29,11 @@ jobs:
2929
- :: checkout-action
3030
- name: install compiler
3131
run: |
32-
if [[ ${{matrix}} == *"32"* ]] ; then
32+
if [[ ${{matrix.namesfx}} == *"32"* ]] ; then
3333
sudo dpkg --add-architecture i386
3434
fi
3535
sudo apt-get update
36-
if [[ ${{matrix}} == *"32"* ]] ; then
36+
if [[ ${{matrix.namesfx}} == *"32"* ]] ; then
3737
sudo apt-get install -y \
3838
linux-libc-dev:i386 \
3939
libc6:i386 \
@@ -45,8 +45,11 @@ jobs:
4545
cmake \
4646
git \
4747
lcov \
48-
g++-$GCC_VERSION \
48+
g++-$GCC_VERSION
49+
if [[ ${{matrix.namesfx}} == *"32"* ]] ; then
50+
sudo apt-get install -y \
4951
g++-$GCC_VERSION-multilib
52+
fi
5053
- name: show info
5154
run: source .github/setenv.sh && c4_show_info
5255
- name: configure
@@ -59,7 +62,15 @@ jobs:
5962
${{matrix.cmk}}
6063
- name: build
6164
run: |
62-
cmake --build build/$BUILD_ID --verbose --target ryml-test-build --parallel
65+
numprocs=`nproc`
66+
if [ -n "${{matrix.halfprocs}}" ] ; then
67+
if (( $numprocs > 1 )) ; then
68+
numprocs=$(($numprocs / 2))
69+
fi
70+
fi
71+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
72+
cmake --build build/$BUILD_ID --verbose --target ryml-test-build \
73+
--parallel $numprocs
6374
- name: run
6475
run: |
6576
export CTEST_PARALLEL_LEVEL=`nproc`

0 commit comments

Comments
 (0)