Skip to content

Commit b076d39

Browse files
committed
Update changelog and fix CI jobs failing on heavy builds
1 parent 5b998df commit b076d39

9 files changed

Lines changed: 599 additions & 377 deletions

File tree

.github/workflows/clang.yml

Lines changed: 80 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,17 @@ 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+
source .github/setenv.sh
599+
numprocs=`_c4getnumcores`
600+
if [ -n "0"] ; then
601+
if [ "0" == "1" ] ; then
602+
if (( $numprocs > 1 )) ; then
603+
numprocs=$(($numprocs / 2))
604+
fi
605+
fi
606+
fi
607+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
608+
cmake --build build/Debug --target ryml-test-build --parallel $numprocs --verbose
583609
- name: 'run Debug ::: -m${{matrix.bits}}'
584610
run: |
585611
source .github/setenv.sh
@@ -607,7 +633,17 @@ jobs:
607633
-DRYML_DBG=OFF
608634
- name: 'build Release ::: -O1 -DNDEBUG -m${{matrix.bits}}'
609635
run: |
610-
cmake --build build/Release --target ryml-test-build --parallel --verbose
636+
source .github/setenv.sh
637+
numprocs=`_c4getnumcores`
638+
if [ -n "0"] ; then
639+
if [ "0" == "1" ] ; then
640+
if (( $numprocs > 1 )) ; then
641+
numprocs=$(($numprocs / 2))
642+
fi
643+
fi
644+
fi
645+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
646+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
611647
- name: 'run Release ::: -O1 -DNDEBUG -m${{matrix.bits}}'
612648
run: |
613649
source .github/setenv.sh
@@ -635,7 +671,17 @@ jobs:
635671
-DRYML_DBG=OFF
636672
- name: 'build Release ::: -O2 -DNDEBUG -m${{matrix.bits}}'
637673
run: |
638-
cmake --build build/Release --target ryml-test-build --parallel --verbose
674+
source .github/setenv.sh
675+
numprocs=`_c4getnumcores`
676+
if [ -n "0"] ; then
677+
if [ "0" == "1" ] ; then
678+
if (( $numprocs > 1 )) ; then
679+
numprocs=$(($numprocs / 2))
680+
fi
681+
fi
682+
fi
683+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
684+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
639685
- name: 'run Release ::: -O2 -DNDEBUG -m${{matrix.bits}}'
640686
run: |
641687
source .github/setenv.sh
@@ -663,7 +709,17 @@ jobs:
663709
-DRYML_DBG=OFF
664710
- name: 'build Release ::: -O3 -DNDEBUG -m${{matrix.bits}}'
665711
run: |
666-
cmake --build build/Release --target ryml-test-build --parallel --verbose
712+
source .github/setenv.sh
713+
numprocs=`_c4getnumcores`
714+
if [ -n "0"] ; then
715+
if [ "0" == "1" ] ; then
716+
if (( $numprocs > 1 )) ; then
717+
numprocs=$(($numprocs / 2))
718+
fi
719+
fi
720+
fi
721+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
722+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
667723
- name: 'run Release ::: -O3 -DNDEBUG -m${{matrix.bits}}'
668724
run: |
669725
source .github/setenv.sh
@@ -691,7 +747,17 @@ jobs:
691747
-DRYML_DBG=OFF
692748
- name: 'build Release ::: -Os -DNDEBUG -m${{matrix.bits}}'
693749
run: |
694-
cmake --build build/Release --target ryml-test-build --parallel --verbose
750+
source .github/setenv.sh
751+
numprocs=`_c4getnumcores`
752+
if [ -n "0"] ; then
753+
if [ "0" == "1" ] ; then
754+
if (( $numprocs > 1 )) ; then
755+
numprocs=$(($numprocs / 2))
756+
fi
757+
fi
758+
fi
759+
export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
760+
cmake --build build/Release --target ryml-test-build --parallel $numprocs --verbose
695761
- name: 'run Release ::: -Os -DNDEBUG -m${{matrix.bits}}'
696762
run: |
697763
source .github/setenv.sh
@@ -788,7 +854,11 @@ jobs:
788854
submodules: recursive
789855
fetch-depth: 0
790856
- run: git config --system --add safe.directory '*'
791-
- run: c4core-install ${{matrix.cxx}}
857+
- run: |
858+
# retry if it fails
859+
c4core-install ${{matrix.cxx}} \
860+
|| c4core-install ${{matrix.cxx}} \
861+
|| c4core-install ${{matrix.cxx}}
792862
- name: show info
793863
run: source .github/setenv.sh && c4_show_info
794864
- 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)