diff options
author | Eric Curtin <ericcurtin17@gmail.com> | 2020-01-28 17:27:25 +0000 |
---|---|---|
committer | Eric Curtin <ericcurtin17@gmail.com> | 2020-01-28 17:27:25 +0000 |
commit | 298fb6acd3ace345333acb45bc4df4cfa03052cb (patch) | |
tree | 0fee92cb0aa1c9582340d6750fd089a249bf3887 | |
parent | 79980baa2ec8db668a8724b5b115db548ea83cc8 (diff) | |
download | inotify-tools-298fb6acd3ace345333acb45bc4df4cfa03052cb.zip inotify-tools-298fb6acd3ace345333acb45bc4df4cfa03052cb.tar.gz inotify-tools-298fb6acd3ace345333acb45bc4df4cfa03052cb.tar.bz2 |
De-duplicate build_and_test script
-rw-r--r-- | .github/workflows/build.yml | 28 | ||||
-rwxr-xr-x | build_and_test.sh | 41 |
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 + |