File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,34 +11,17 @@ jobs:
1111 runs-on : ubuntu-latest
1212 steps :
1313 - uses : actions/checkout@v4
14- - name : Install build tools and gtest
14+ - name : Install build tools
1515 run : |
1616 sudo apt-get update
17- sudo apt-get install -y build-essential cmake libgtest-dev
18- # Build and install gtest binaries (Ubuntu provides sources only)
19- pushd /usr/src/gtest || exit 0
20- cmake . && make || true
21- sudo cp libgtest*.a /usr/lib/ || true
22- popd || true
17+ sudo apt-get install -y build-essential cmake
2318 - name : Build
2419 run : make
25- - name : Run C tests
26- run : |
27- if [ -x tests/test_packet ]; then
28- ./tests/test_packet
29- else
30- echo "tests/test_packet missing"; exit 1
31- fi
3220 - name : Build and run C tests
3321 run : |
3422 make ctest
3523 if [ -x tests/ctest ]; then
3624 ./tests/ctest
37- elif [ -x tests/ctest ] || [ -x tests/ctest ]; then
38- ./tests/ctest
39- elif [ -x tests/ctest ]; then
40- ./tests/ctest
4125 else
42- # older make target produces tests/ctest or tests/ctest
43- if [ -x tests/ctest ]; then ./tests/ctest; else echo "ctest binary missing"; exit 1; fi
26+ echo "ctest binary missing"; exit 1
4427 fi
Original file line number Diff line number Diff line change 11CC ?= cc
22CFLAGS ?= -O2 -Iinclude -Wall -Wextra -std=c99
3-
4- CC ?= cc
5- CXX ?= g++
6- CFLAGS ?= -O2 -Iinclude -Wall -Wextra -std=c99
7- CXXFLAGS ?= -O2 -Iinclude -Wall -Wextra -std=gnu++11
83AR ?= ar
94
105PREFIX ?= /usr/local
@@ -25,11 +20,11 @@ ctest: lib tests/unit_tests.c
2520 $(CC ) $(CFLAGS ) -Iinclude tests/unit_tests.c -L. -lspacepacket -o tests/ctest
2621
2722clean :
28- rm -f src/* .o $(LIBNAME ) examples/spacepacket_example tests/test_packet tests/gtest_tests
23+ rm -f src/* .o $(LIBNAME ) examples/spacepacket_example tests/ctest
2924
3025install : lib
3126 mkdir -p $(PREFIX ) /lib $(PREFIX ) /include
3227 cp $(LIBNAME ) $(PREFIX ) /lib/
3328 cp include/space_packet.h $(PREFIX ) /include/
3429
35- .PHONY : all lib example test gtest clean install
30+ .PHONY : all lib example test ctest clean install
You can’t perform that action at this time.
0 commit comments