aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml28
-rwxr-xr-xbuild_and_test.sh41
2 files changed, 45 insertions, 24 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9dbd806..3bb9926 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,18 +9,8 @@ jobs:
steps:
- uses: actions/checkout@v1
- - name: gcc build
- run: git clean -fdx && export CC=gcc && ./autogen.sh && ./configure && make -j2
- - name: unit test
- run: cd ./libinotifytools/src/ && make -j2 test && ./test
- - name: integration test
- run: cd t && make -j2
- - name: clang build
- run: git clean -fdx && export CC=clang && ./autogen.sh && ./configure && make -j2
- - name: unit test
- run: cd ./libinotifytools/src/ && make -j2 test && ./test
- - name: integration test
- run: cd t && make -j2
+ - name: build_and_test
+ run: ./build_and_test.sh
build-1804:
@@ -28,16 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v1
- - name: gcc build
- run: git clean -fdx && export CC=gcc && ./autogen.sh && ./configure && make -j2
- - name: unit test
- run: cd ./libinotifytools/src/ && make -j2 test && ./test
- - name: integration test
- run: cd t && make -j2
- - name: clang build
- run: git clean -fdx && export CC=clang && ./autogen.sh && ./configure && make -j2
- - name: unit test
- run: cd ./libinotifytools/src/ && make -j2 test && ./test
- - name: integration test
- run: cd t && make -j2
+ - name: build_and_test
+ run: ./build_and_test.sh
diff --git a/build_and_test.sh b/build_and_test.sh
new file mode 100755
index 0000000..43c6308
--- /dev/null
+++ b/build_and_test.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -e
+
+j=3
+
+printf "gcc build\n"
+git clean -fdx 2>&1
+export CC=gcc
+./autogen.sh
+./configure
+make -j$j
+
+printf "\nunit test\n"
+cd libinotifytools/src/
+make -j$j test
+./test
+cd -
+
+printf "\nintegration test\n"
+cd t
+make -j$j
+cd -
+
+printf "\nclang build\n"
+git clean -fdx 2>&1
+export CC=clang
+./autogen.sh
+./configure
+make -j$j
+
+printf "\nunit test\n"
+cd libinotifytools/src/
+make -j$j test
+./test
+cd -
+
+printf "\nintegration test\n"
+cd t
+make -j$j
+