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