-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from openSUSE/ci
Integrate basic Github CI
- Loading branch information
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: basic-build-and-ci | ||
on: [push] | ||
jobs: | ||
bionic: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: mpath | ||
run: sudo modprobe dm_multipath | ||
- name: zram | ||
run: sudo modprobe zram num_devices=0 | ||
- name: zram-device | ||
run: echo ZRAM=$(sudo cat /sys/class/zram-control/hot_add) >> $GITHUB_ENV | ||
- name: set-zram-size | ||
run: echo 1G | sudo tee /sys/block/zram$ZRAM/disksize | ||
- name: update | ||
run: sudo apt-get update | ||
- name: dependencies | ||
run: > | ||
sudo apt-get install --yes gcc | ||
make perl-base pkg-config valgrind | ||
libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev | ||
libudev-dev libjson-c-dev liburcu-dev libcmocka-dev | ||
- 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/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 |