From 298fb6acd3ace345333acb45bc4df4cfa03052cb Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Tue, 28 Jan 2020 17:27:25 +0000 Subject: De-duplicate build_and_test script --- .github/workflows/build.yml | 28 ++++------------------------ build_and_test.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 24 deletions(-) create mode 100755 build_and_test.sh 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 + -- cgit v1.1