11name : Linux Build & Unit Tests
2- on : [push]
2+ on : [push, pull_request ]
33
44jobs :
55 build :
66 name : unit-tests
77 runs-on : ubuntu-latest
88 steps :
9- - uses : actions/checkout@v3
9+ - uses : actions/checkout@v4
1010
1111 - name : install tools
1212 run : |
@@ -40,10 +40,10 @@ jobs:
4040 cmake -DTE_POW_FROM_RIGHT=1 ./
4141 make -j4
4242 cd bin
43- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
44- cat TE-junit2 .xml
45- errors=$(cat TE-junit2 .xml | grep -Po '(errors)="\K[^"]*')
46- failures=$(cat TE-junit2 .xml | grep -Po '(failures)="\K[^"]*')
43+ ./TETestRunner --reporter JUnit::out=TE-junit-pow-from-right .xml
44+ cat TE-junit-pow-from-right .xml
45+ errors=$(cat TE-junit-pow-from-right .xml | grep -Po '(errors)="\K[^"]*')
46+ failures=$(cat TE-junit-pow-from-right .xml | grep -Po '(failures)="\K[^"]*')
4747 echo "Error count is: ${errors}"
4848 echo "Failure count is: ${failures}"
4949 if [ "$errors" -gt 0 ]; then
@@ -59,10 +59,10 @@ jobs:
5959 cmake -DTE_FLOAT=1 ./
6060 make -j4
6161 cd bin
62- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
63- cat TE-junit2 .xml
64- errors=$(cat TE-junit2 .xml | grep -Po '(errors)="\K[^"]*')
65- failures=$(cat TE-junit2 .xml | grep -Po '(failures)="\K[^"]*')
62+ ./TETestRunner --reporter JUnit::out=TE-junit-float .xml
63+ cat TE-junit-float .xml
64+ errors=$(cat TE-junit-float .xml | grep -Po '(errors)="\K[^"]*')
65+ failures=$(cat TE-junit-float .xml | grep -Po '(failures)="\K[^"]*')
6666 echo "Error count is: ${errors}"
6767 echo "Failure count is: ${failures}"
6868 if [ "$errors" -gt 0 ]; then
@@ -78,10 +78,10 @@ jobs:
7878 cmake -DTE_LONG_DOUBLE=1 ./
7979 make -j4
8080 cd bin
81- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
82- cat TE-junit2 .xml
83- errors=$(cat TE-junit2 .xml | grep -Po '(errors)="\K[^"]*')
84- failures=$(cat TE-junit2 .xml | grep -Po '(failures)="\K[^"]*')
81+ ./TETestRunner --reporter JUnit::out=TE-junit-long-double .xml
82+ cat TE-junit-long-double .xml
83+ errors=$(cat TE-junit-long-double .xml | grep -Po '(errors)="\K[^"]*')
84+ failures=$(cat TE-junit-long-double .xml | grep -Po '(failures)="\K[^"]*')
8585 echo "Error count is: ${errors}"
8686 echo "Failure count is: ${failures}"
8787 if [ "$errors" -gt 0 ]; then
@@ -97,10 +97,10 @@ jobs:
9797 cmake -DTE_BITWISE_OPERATORS=1 ./
9898 make -j4
9999 cd bin
100- ./TETestRunner --reporter JUnit::out=TE-junit2 .xml
101- cat TE-junit2 .xml
102- errors=$(cat TE-junit2 .xml | grep -Po '(errors)="\K[^"]*')
103- failures=$(cat TE-junit2 .xml | grep -Po '(failures)="\K[^"]*')
100+ ./TETestRunner --reporter JUnit::out=TE-junit-bitwise .xml
101+ cat TE-junit-bitwise .xml
102+ errors=$(cat TE-junit-bitwise .xml | grep -Po '(errors)="\K[^"]*')
103+ failures=$(cat TE-junit-bitwise .xml | grep -Po '(failures)="\K[^"]*')
104104 echo "Error count is: ${errors}"
105105 echo "Failure count is: ${failures}"
106106 if [ "$errors" -gt 0 ]; then
@@ -110,4 +110,8 @@ jobs:
110110 exit 1
111111 fi
112112
113-
113+ - name : Archive test results
114+ uses : actions/upload-artifact@v4
115+ with :
116+ name : Linux unit tests
117+ path : ${{ github.workspace }}/tests/bin/*.xml
0 commit comments