Add GitHub Actions for regression testing

This commit is contained in:
ISSOtm
2020-01-30 18:29:47 +01:00
parent 3fce9ed9a4
commit 97bcbf5d84
2 changed files with 40 additions and 0 deletions

14
.github/actions/install_deps.sh vendored Executable file
View File

@@ -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

26
.github/workflows/testing.yml vendored Normal file
View File

@@ -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