Skip to content

Commit 2259444

Browse files
authored
Github actions scripts with group / endgroup (#7947)
1 parent 07590eb commit 2259444

7 files changed

Lines changed: 77 additions & 55 deletions

File tree

scripts/ci/linux64/build.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -ev
2+
# set -ev
33
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
44
# Add compiler flag to reduce memory usage to enable builds to complete
55
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746#c7
@@ -11,28 +11,33 @@ if [ "$OPT" == "qbs" ]; then
1111
echo "building with qbs"
1212
export PATH="$TRAVIS_BUILD_DIR/linuxbrew/.linuxbrew/bin:$HOME/linuxbrew/.linuxbrew/sbin:$PATH"
1313

14-
echo "**** Building emptyExample ****"
14+
echo "##[group]**** Building emptyExample ****"
1515
cd $ROOT/scripts/templates/linux64
1616
sed -i "s/property bool makeOF: true/property bool makeOF: false/g" qtcreator.qbs
1717
qbs
18+
echo "##[endgroup]"
1819
else
1920
echo "building with makefiles"
20-
echo "**** Building OF core ****"
2121
cd $ROOT
22+
23+
echo "##[group]**** Building OF core ****"
2224
# this carries over to subsequent compilations of examples
2325
echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux64/config.linux64.default.mk
2426
sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk
2527
cd libs/openFrameworksCompiled/project
26-
make -j
28+
make -j2
29+
echo "##[endgroup]"
2730

28-
echo "**** Building emptyExample ****"
31+
echo "##[group]**** Building emptyExample ****"
2932
cd $ROOT/scripts/templates/linux64
30-
make -j
33+
make -j2
34+
echo "##[endgroup]"
3135

32-
echo "**** Building allAddonsExample ****"
36+
echo "##[group]**** Building allAddonsExample ****"
3337
cd $ROOT
3438
cp scripts/templates/linux64/Makefile examples/templates/allAddonsExample/
3539
cp scripts/templates/linux64/config.make examples/templates/allAddonsExample/
3640
cd examples/templates/allAddonsExample/
37-
make -j
41+
make -j2
42+
echo "##[endgroup]"
3843
fi

scripts/ci/linux64/run_tests.sh

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
#!/bin/bash
2-
set -ev
2+
# set -ev
33
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
4-
# source $ROOT/scripts/ci/ccache.sh
54

65
# if [ "$OPT" == "qbs" ]; then
76
# exit 0
87
# else
9-
echo "**** Running unit tests ****"
10-
cd $ROOT/tests
11-
for group in *; do
12-
if [ -d $group ]; then
13-
for test in $group/*; do
14-
if [ -d $test ]; then
15-
cd $test
16-
cp ../../../scripts/templates/linux/Makefile .
17-
cp ../../../scripts/templates/linux/config.make .
18-
make -j Debug
19-
cd bin
20-
binname=$(basename ${test})
21-
#gdb -batch -ex "run" -ex "bt" -ex "q \$_exitcode" ./${binname}_debug
22-
./${binname}_debug
23-
errorcode=$?
24-
if [[ $errorcode -ne 0 ]]; then
25-
exit $errorcode
26-
fi
27-
cd $ROOT/tests
8+
9+
echo "##[group]**** Running unit tests ****"
10+
cd $ROOT/tests
11+
for group in *; do
12+
if [ -d $group ]; then
13+
echo "##[group] $group"
14+
for test in $group/*; do
15+
if [ -d $test ]; then
16+
cd $test
17+
cp ../../../scripts/templates/linux/Makefile .
18+
cp ../../../scripts/templates/linux/config.make .
19+
make -j2 Debug
20+
cd bin
21+
binname=$(basename ${test})
22+
#gdb -batch -ex "run" -ex "bt" -ex "q \$_exitcode" ./${binname}_debug
23+
./${binname}_debug
24+
errorcode=$?
25+
if [[ $errorcode -ne 0 ]]; then
26+
exit $errorcode
2827
fi
29-
done
30-
fi
31-
done
28+
cd $ROOT/tests
29+
fi
30+
done
31+
echo "##[endgroup]"
32+
fi
33+
done
3234
# fi
35+
echo "##[endgroup]"

scripts/ci/linuxrpi/build.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -ev
2+
# set -ev
33
OF_ROOT=$( cd "$(dirname "$0")/../../.." ; pwd -P )
44

55
export CROSS_COMPILING=1
@@ -33,18 +33,20 @@ export CC="${TOOLCHAIN_ROOT}/bin/${GCC_PREFIX}-gcc"
3333
export AR=${TOOLCHAIN_ROOT}/bin/${GCC_PREFIX}-ar
3434
export LD=${TOOLCHAIN_ROOT}/bin/${GCC_PREFIX}-ld
3535

36-
echo "**** Building emptyExample ****"
36+
echo "##[group]**** Building emptyExample ****"
3737
cd $OF_ROOT
3838
cp scripts/templates/linux${PLATFORM_ARCH}/Makefile examples/templates/emptyExample/
3939
cp scripts/templates/linux${PLATFORM_ARCH}/config.make examples/templates/emptyExample/
4040
cd examples/templates/emptyExample/
41-
make Debug -j
41+
make Debug -j2
42+
echo "##[endgroup]"
4243

4344
# if [[ "$ALLADDONSEXAMPLE" == 1 ]]; then
44-
echo "**** Building allAddonsExample ****"
45+
echo "##[group]**** Building allAddonsExample ****"
4546
cd $OF_ROOT
4647
cp scripts/templates/linux${PLATFORM_ARCH}/Makefile examples/templates/allAddonsExample/
4748
cp scripts/templates/linux${PLATFORM_ARCH}/config.make examples/templates/allAddonsExample/
4849
cd examples/templates/allAddonsExample/
49-
make Debug -j
50+
make Debug -j2
51+
echo "##[endgroup]"
5052
# fi

scripts/ci/msys2/build.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
#!/bin/bash
2-
set -ev
2+
# set -ev
33
ROOT="$PWD"
44

5-
echo "**** Building OF core ****"
5+
echo "##[group]**** Building OF core ****"
66
cd $ROOT/libs/openFrameworksCompiled/project
7-
make -j -s Debug
7+
make -j2 -s Debug
8+
echo "##[endgroup]"
89

9-
echo "**** Building emptyExample ****"
10+
echo "##[group]**** Building emptyExample ****"
1011
cd $ROOT/scripts/templates/msys2
11-
make -j -s Debug
12+
make -j2 -s Debug
13+
echo "##[endgroup]"
1214

13-
echo "**** Building allAddonsExample ****"
15+
echo "##[group]**** Building allAddonsExample ****"
1416
cd $ROOT
1517
cp scripts/templates/msys2/Makefile examples/templates/allAddonsExample/
1618
cp scripts/templates/msys2/config.make examples/templates/allAddonsExample/
1719
cd examples/templates/allAddonsExample/
18-
make -j -s Debug
20+
make -j2 -s Debug
21+
echo "##[endgroup]"

scripts/ci/msys2/run_tests.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
#!/bin/bash
2-
set -ev
2+
# set -ev
33
ROOT=$(pwd -P)
44
# source $ROOT/scripts/ci/ccache.sh
55

6-
echo "**** Running unit tests ****"
6+
echo "##[group]**** Running unit tests ****"
77
cd $ROOT/tests
88
for group in *; do
99
if [ -d $group ]; then
10+
echo "##[group] $group"
1011
for test in $group/*; do
1112
if [ -d $test ]; then
1213
cd $test
1314
cp ../../../scripts/templates/msys2/Makefile .
1415
cp ../../../scripts/templates/msys2/config.make .
15-
make -j Debug
16+
make -j2 Debug
1617
cd bin
1718
binname=$(basename ${test})
1819
#gdb -batch -ex "run" -ex "bt" -ex "q \$_exitcode" ./${binname}_debug
@@ -24,5 +25,7 @@ for group in *; do
2425
cd $ROOT/tests
2526
fi
2627
done
28+
echo "##[endgroup]"
2729
fi
2830
done
31+
echo "##[endgroup]"

scripts/ci/osx/run_tests.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
#!/bin/bash
2-
set -ev
2+
#set -ev
33
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
4-
# source $ROOT/scripts/ci/ccache.sh
54

65
trap 'for f in ~/Library/Logs/DiagnosticReports/*; do cat $f; done' 11
76

8-
echo "**** Building emptyExample ****"
7+
echo "##[group]**** Building emptyExample ****"
98
cd $ROOT
109
cp scripts/templates/osx/Makefile examples/templates/emptyExample/
1110
cp scripts/templates/osx/config.make examples/templates/emptyExample/
1211
cd examples/templates/emptyExample/
13-
make -j Debug
12+
make -j2 Debug
13+
echo "##[endgroup]"
1414

15-
echo "**** Building allAddonsExample ****"
15+
echo "##[group]**** Building allAddonsExample ****"
1616
cd $ROOT
1717
cp scripts/templates/osx/Makefile examples/templates/allAddonsExample/
1818
cp scripts/templates/osx/config.make examples/templates/allAddonsExample/
1919
cd examples/templates/allAddonsExample/
20-
make -j Debug
20+
make -j2 Debug
21+
echo "##[endgroup]"
2122

22-
echo "**** Running unit tests ****"
23+
echo "##[group]**** Running unit tests ****"
2324
cd $ROOT/tests
2425
for group in *; do
2526
if [ -d $group ]; then
27+
echo "##[group] $group"
2628
for test in $group/*; do
2729
if [ -d $test ]; then
2830
cd $test
2931
cp ../../../scripts/templates/osx/Makefile .
3032
cp ../../../scripts/templates/osx/config.make .
31-
make -j Debug
33+
make -j2 Debug
3234
make RunDebug
3335
errorcode=$?
3436
if [[ $errorcode -ne 0 ]]; then
@@ -37,5 +39,7 @@ for group in *; do
3739
cd $ROOT/tests
3840
fi
3941
done
42+
echo "##[endgroup]"
4043
fi
4144
done
45+
echo "##[endgroup]"

scripts/ci/vs/run_tests.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set TESTS_PLATFORM=%PLATFORM%
33
set STATUS=0
44
if "%PLATFORM%" equ "x86" set TESTS_PLATFORM=Win32
55
FOR /D %%G IN (*) DO (
6+
echo ##[group]%%G
67
echo %APPVEYOR_BUILD_FOLDER%\tests\%%G
78
cd %APPVEYOR_BUILD_FOLDER%\tests\%%G
89
FOR /D %%E IN (*) DO (
@@ -18,6 +19,7 @@ FOR /D %%G IN (*) DO (
1819
if ERRORLEVEL 1 echo "Finished with error" & SET STATUS=1
1920
)
2021
)
22+
echo ##[endgroup]
2123
)
2224
cd ..
2325
echo "Tests finished with status %STATUS%"

0 commit comments

Comments
 (0)