55 build :
66 name : unit-tests
77 runs-on : macos-latest
8+ permissions :
9+ contents : read
810 steps :
9- - uses : actions/checkout@v3
11+ - uses : actions/checkout@v4
1012
1113 - name : build & run tests
1214 run : |
@@ -17,10 +19,10 @@ jobs:
1719 cmake ./
1820 make -j4
1921 cd bin
20- ./TETestRunner --reporter JUnit::out=TE -junit.xml
21- cat TE -junit.xml
22- errors=$(cat TE -junit.xml | ggrep -Po '(errors)="\K[^"]*')
23- failures=$(cat TE -junit.xml | ggrep -Po '(failures)="\K[^"]*')
22+ ./TETestRunner --reporter JUnit::out=te -junit.xml
23+ cat te -junit.xml
24+ errors=$(cat te -junit.xml | ggrep -Po '(errors)="\K[^"]*')
25+ failures=$(cat te -junit.xml | ggrep -Po '(failures)="\K[^"]*')
2426 echo "Error count is: ${errors}"
2527 echo "Failure count is: ${failures}"
2628 if [ "$errors" -gt 0 ]; then
@@ -36,10 +38,10 @@ jobs:
3638 cmake -DTE_POW_FROM_RIGHT=1 ./
3739 make -j4
3840 cd bin
39- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
40- cat TE-junit2 .xml
41- errors=$(cat TE-junit2 .xml | ggrep -Po '(errors)="\K[^"]*')
42- failures=$(cat TE-junit2 .xml | ggrep -Po '(failures)="\K[^"]*')
41+ ./TETestRunner --reporter JUnit::out=te-junit-pow-from-right .xml
42+ cat te-junit-pow-from-right .xml
43+ errors=$(cat te-junit-pow-from-right .xml | ggrep -Po '(errors)="\K[^"]*')
44+ failures=$(cat te-junit-pow-from-right .xml | ggrep -Po '(failures)="\K[^"]*')
4345 echo "Error count is: ${errors}"
4446 echo "Failure count is: ${failures}"
4547 if [ "$errors" -gt 0 ]; then
@@ -55,10 +57,10 @@ jobs:
5557 cmake -DTE_FLOAT=1 ./
5658 make -j4
5759 cd bin
58- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
59- cat TE-junit2 .xml
60- errors=$(cat TE-junit2 .xml | ggrep -Po '(errors)="\K[^"]*')
61- failures=$(cat TE-junit2 .xml | ggrep -Po '(failures)="\K[^"]*')
60+ ./TETestRunner --reporter JUnit::out=te-junit-float .xml
61+ cat te-junit-float .xml
62+ errors=$(cat te-junit-float .xml | ggrep -Po '(errors)="\K[^"]*')
63+ failures=$(cat te-junit-float .xml | ggrep -Po '(failures)="\K[^"]*')
6264 echo "Error count is: ${errors}"
6365 echo "Failure count is: ${failures}"
6466 if [ "$errors" -gt 0 ]; then
@@ -74,10 +76,10 @@ jobs:
7476 cmake -DTE_LONG_DOUBLE=1 ./
7577 make -j4
7678 cd bin
77- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
78- cat TE-junit2 .xml
79- errors=$(cat TE-junit2 .xml | ggrep -Po '(errors)="\K[^"]*')
80- failures=$(cat TE-junit2 .xml | ggrep -Po '(failures)="\K[^"]*')
79+ ./TETestRunner --reporter JUnit::out=te-junit-long-double .xml
80+ cat te-junit-long-double .xml
81+ errors=$(cat te-junit-long-double .xml | ggrep -Po '(errors)="\K[^"]*')
82+ failures=$(cat te-junit-long-double .xml | ggrep -Po '(failures)="\K[^"]*')
8183 echo "Error count is: ${errors}"
8284 echo "Failure count is: ${failures}"
8385 if [ "$errors" -gt 0 ]; then
@@ -93,10 +95,10 @@ jobs:
9395 cmake -DTE_BITWISE_OPERATORS=1 ./
9496 make -j4
9597 cd bin
96- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
97- cat TE-junit2 .xml
98- errors=$(cat TE-junit2 .xml | ggrep -Po '(errors)="\K[^"]*')
99- failures=$(cat TE-junit2 .xml | ggrep -Po '(failures)="\K[^"]*')
98+ ./TETestRunner --reporter JUnit::out=te-junit-bitwise .xml
99+ cat te-junit-bitwise .xml
100+ errors=$(cat te-junit-bitwise .xml | ggrep -Po '(errors)="\K[^"]*')
101+ failures=$(cat te-junit-bitwise .xml | ggrep -Po '(failures)="\K[^"]*')
100102 echo "Error count is: ${errors}"
101103 echo "Failure count is: ${failures}"
102104 if [ "$errors" -gt 0 ]; then
@@ -105,3 +107,9 @@ jobs:
105107 if [ "$failures" -gt 0 ]; then
106108 exit 1
107109 fi
110+
111+ - name : Archive test results
112+ uses : actions/upload-artifact@v4
113+ with :
114+ name : macOS unit tests
115+ path : ${{ github.workspace }}/tests/bin/*.xml
0 commit comments