github actions: unit tests

Add unit tests through github actions. This is exactly the same as our
travis tests but using github actions instead.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2020-02-12 12:41:15 +01:00 committed by Artem Savkov
parent 6321c9ab5e
commit 5abe5f666b

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

@ -0,0 +1,26 @@
name: build and unit tests
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
cflags: [ "", "-O2", "-O3" ]
runs-on: ubuntu-latest
env:
CFLAGS: ${{ matrix.cflags }}
steps:
- uses: actions/checkout@v2
- name: dependencies
run: sudo apt-get install -y libelf-dev linux-headers-$(uname -r) shellcheck elfutils
- name: make
run: make
- name: submodule update
run: git submodule update --init
- name: make unit
run: make unit
- name: make check
run: make check
- name: install
run: sudo make install