From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Fri, 18 Dec 2020 23:44:11 +0100 Subject: [PATCH] github workflow: add tests with gcc 10 and clang Signed-off-by: Benjamin Marzinski --- .github/workflows/build-and-unittest.yaml | 62 ++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-unittest.yaml b/.github/workflows/build-and-unittest.yaml index 389578be..4173576f 100644 --- a/.github/workflows/build-and-unittest.yaml +++ b/.github/workflows/build-and-unittest.yaml @@ -1,7 +1,7 @@ name: basic-build-and-ci on: [push] jobs: - build: + bionic: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 @@ -33,3 +33,63 @@ jobs: run: rm -f tests/dmevents.out tests/directio.out - name: root-test run: sudo make DIO_TEST_DEV=/dev/zram$ZRAM test + focal-gcc10: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: mpath + run: sudo modprobe dm_multipath + - name: brd + run: sudo modprobe brd rd_nr=1 rd_size=65536 + - name: update + run: sudo apt-get update + - name: dependencies + run: > + sudo apt-get install --yes gcc-10 + make perl-base pkg-config valgrind + libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + - name: set CC + run: echo CC=gcc-10 >> $GITHUB_ENV + - name: build + run: make -O -j$(grep -c ^processor /proc/cpuinfo) + - name: test + run: make -O -j$(grep -c ^processor /proc/cpuinfo) test + - name: valgrind-test + run: make -O -j$(grep -c ^processor /proc/cpuinfo) valgrind-test + - name: valgrind-results + run: cat tests/*.vgr + - name: clean-nonroot-artifacts + run: rm -f tests/dmevents.out tests/directio.out + - name: root-test + run: sudo make DIO_TEST_DEV=/dev/ram0 test + focal-clang10: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: mpath + run: sudo modprobe dm_multipath + - name: brd + run: sudo modprobe brd rd_nr=1 rd_size=65536 + - name: update + run: sudo apt-get update + - name: dependencies + run: > + sudo apt-get install --yes clang + make perl-base pkg-config valgrind + libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev + libudev-dev libjson-c-dev liburcu-dev libcmocka-dev + - name: set CC + run: echo CC=clang >> $GITHUB_ENV + - name: build + run: make -O -j$(grep -c ^processor /proc/cpuinfo) + - name: test + run: make -O -j$(grep -c ^processor /proc/cpuinfo) test + - name: valgrind-test + run: make -O -j$(grep -c ^processor /proc/cpuinfo) valgrind-test + - name: valgrind-results + run: cat tests/*.vgr + - name: clean-nonroot-artifacts + run: rm -f tests/dmevents.out tests/directio.out + - name: root-test + run: sudo make DIO_TEST_DEV=/dev/ram0 test