summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2023-08-20 23:37:08 +0200
committerjvoisin2023-08-20 23:39:59 +0200
commita9abb9fa5b9124174e9a7ddeec95c8323f4b16af (patch)
treeeb50de61813f7911447c7757a81f4ee40d5800b5
parent0f19089c58fb940791659e1c4b4e98795240df4e (diff)
Split build and run
Both in the CI, and in the Makefile
-rw-r--r--.github/workflows/coverage.yaml2
-rw-r--r--.github/workflows/testsuite.yaml10
-rw-r--r--tests/Makefile10
3 files changed, 13 insertions, 9 deletions
diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml
index eaf5a87..28a2cd6 100644
--- a/.github/workflows/coverage.yaml
+++ b/.github/workflows/coverage.yaml
@@ -39,7 +39,7 @@ jobs:
39 - name: Installing lcov 39 - name: Installing lcov
40 run: sudo apt install lcov 40 run: sudo apt install lcov
41 - name: Running the testsuite 41 - name: Running the testsuite
42 run: make -C tests clean coverage 42 run: make -C tests clean coverage run
43 - name: Setup Pages 43 - name: Setup Pages
44 uses: actions/configure-pages@v3 44 uses: actions/configure-pages@v3
45 - name: Upload artifact 45 - name: Upload artifact
diff --git a/.github/workflows/testsuite.yaml b/.github/workflows/testsuite.yaml
index 9588cb8..c2ca309 100644
--- a/.github/workflows/testsuite.yaml
+++ b/.github/workflows/testsuite.yaml
@@ -30,9 +30,12 @@ jobs:
30 run: | 30 run: |
31 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} 100 31 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} 100
32 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} 100 32 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} 100
33 - name: Build
34 shell: bash
35 run: make -C tests gcc
33 - name: Running the testsuite 36 - name: Running the testsuite
34 shell: bash 37 shell: bash
35 run: make -C tests gcc | grep -zqv FAIL 38 run: make -C tests run | grep -zqv FAIL
36 39
37 clang: 40 clang:
38 runs-on: ubuntu-latest 41 runs-on: ubuntu-latest
@@ -58,6 +61,9 @@ jobs:
58 run: | 61 run: |
59 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.version }} 100 62 sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.version }} 100
60 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.version }} 100 63 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ matrix.version }} 100
64 - name: Build
65 shell: bash
66 run: make -C tests clang
61 - name: Running the testsuite 67 - name: Running the testsuite
62 shell: bash 68 shell: bash
63 run: make -C tests clang | grep -zqv FAIL 69 run: make -C tests run | grep -zqv FAIL
diff --git a/tests/Makefile b/tests/Makefile
index 8db2853..96dfe2d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -96,8 +96,7 @@ TARGETS= \
96.SILENT: 96.SILENT:
97 97
98gcc: CC=../x86_64-linux-musl-native/bin/gcc 98gcc: CC=../x86_64-linux-musl-native/bin/gcc
99gcc: GCOV=../x86_64-linux-musl-native/bin/gcov 99gcc: $(TARGETS)
100gcc: clean all
101 100
102clang: CC=clang 101clang: CC=clang
103clang: GCOV=gcov 102clang: GCOV=gcov
@@ -105,15 +104,14 @@ clang: CFLAGS+=-I/usr/include/x86_64-linux-musl
105clang: CFLAGS+=-I../x86_64-linux-musl-native/include/ 104clang: CFLAGS+=-I../x86_64-linux-musl-native/include/
106clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ 105clang: CFLAGS+=-Ix86_64-linux-musl-native/include/
107clang: CFLAGS+=-nostdinc 106clang: CFLAGS+=-nostdinc
108clang: clean all 107clang: $(TARGETS)
109 108
110 109all: gcc
111all: $(TARGETS) run
112 110
113coverage: CFLAGS += -fprofile-arcs -ftest-coverage 111coverage: CFLAGS += -fprofile-arcs -ftest-coverage
114coverage: CC=../x86_64-linux-musl-native/bin/gcc 112coverage: CC=../x86_64-linux-musl-native/bin/gcc
115coverage: GCOV=../x86_64-linux-musl-native/bin/gcov 113coverage: GCOV=../x86_64-linux-musl-native/bin/gcov
116coverage: all 114coverage: $(TARGETS) run
117 $(GCOV) *.c 115 $(GCOV) *.c
118 lcov --capture --directory . --output-file coverage.info 116 lcov --capture --directory . --output-file coverage.info
119 genhtml coverage.info --output-directory coverage 117 genhtml coverage.info --output-directory coverage