2020-12-08 18:40:44 +00:00
|
|
|
name: zloop
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
2022-02-07 19:44:17 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-12-08 18:40:44 +00:00
|
|
|
env:
|
|
|
|
TEST_DIR: /var/tmp/zloop
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-02-07 19:44:17 +00:00
|
|
|
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
|
|
|
|
sudo apt-get clean
|
2020-12-08 18:40:44 +00:00
|
|
|
- name: Autogen.sh
|
|
|
|
run: |
|
2022-02-07 19:44:17 +00:00
|
|
|
./autogen.sh
|
2020-12-08 18:40:44 +00:00
|
|
|
- name: Configure
|
|
|
|
run: |
|
2022-05-26 16:24:50 +00:00
|
|
|
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan --with-config=dist
|
2020-12-08 18:40:44 +00:00
|
|
|
- name: Make
|
|
|
|
run: |
|
2022-02-07 19:44:17 +00:00
|
|
|
make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
|
2020-12-08 18:40:44 +00:00
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
sudo dpkg -i *.deb
|
|
|
|
# Update order of directories to search for modules, otherwise
|
|
|
|
# Ubuntu will load kernel-shipped ones.
|
|
|
|
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
|
|
|
|
sudo depmod
|
|
|
|
sudo modprobe zfs
|
|
|
|
- name: Tests
|
|
|
|
run: |
|
|
|
|
sudo mkdir -p $TEST_DIR
|
2022-05-12 16:11:29 +00:00
|
|
|
# run for 10 minutes or at most 2 iterations for a maximum runner
|
|
|
|
# time of 20 minutes.
|
|
|
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60
|
2020-12-08 18:40:44 +00:00
|
|
|
- name: Prepare artifacts
|
|
|
|
if: failure()
|
|
|
|
run: |
|
|
|
|
sudo chmod +r -R $TEST_DIR/
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Logs
|
|
|
|
path: |
|
|
|
|
/var/tmp/zloop/*/
|
|
|
|
!/var/tmp/zloop/*/vdev/
|
|
|
|
if-no-files-found: ignore
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Pool files
|
|
|
|
path: |
|
|
|
|
/var/tmp/zloop/*/vdev/
|
|
|
|
if-no-files-found: ignore
|