From 97bcbf5d84a076eebe0ad5c6d683334928ea6217 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Thu, 30 Jan 2020 18:29:47 +0100 Subject: [PATCH] Add GitHub Actions for regression testing --- .github/actions/install_deps.sh | 14 ++++++++++++++ .github/workflows/testing.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 .github/actions/install_deps.sh create mode 100644 .github/workflows/testing.yml diff --git a/.github/actions/install_deps.sh b/.github/actions/install_deps.sh new file mode 100755 index 00000000..4a78dcfe --- /dev/null +++ b/.github/actions/install_deps.sh @@ -0,0 +1,14 @@ +case `echo $1 | cut -d '-' -f 1` in + ubuntu) + sudo apt-get -qq update + sudo apt-get install -yq bison libpng-dev pkg-config + ;; + macos) + brew install libpng pkg-config md5sha1sum + ;; + *) + echo "WARNING: Cannot install deps for OS '$1'" + ;; +esac + +yacc --version diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..69ace111 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,26 @@ +name: "Regression testing" +on: push + +jobs: + testing: + strategy: + matrix: + os: [ubuntu-16.04, ubuntu-18.04, macos-10.15] + cc: [gcc, clang] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Install deps + shell: bash + run: | + ./.github/actions/install_deps.sh ${{ matrix.os }} + - name: Build + run: | + make -j Q= CC=${{ matrix.cc }} + - name: Install + run: | + sudo make install -j Q= + - name: Test + shell: bash + run: | + test/run-tests.sh