xref: /freebsd/sys/contrib/openzfs/.github/workflows/zloop.yml (revision fe6060f10f634930ff71b7c50291ddc610da2475)
1name: zloop
2
3on:
4  push:
5  pull_request:
6
7jobs:
8  tests:
9    runs-on: ubuntu-latest
10    env:
11      TEST_DIR: /var/tmp/zloop
12    steps:
13    - uses: actions/checkout@v2
14      with:
15        ref: ${{ github.event.pull_request.head.sha }}
16    - name: Install dependencies
17      run: |
18        sudo apt-get update
19        sudo apt-get install --yes -qq build-essential autoconf libtool gdb \
20          git alien fakeroot \
21          zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
22          xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
23          libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
24          libpam0g-dev \
25          python-dev python-setuptools python-cffi python-packaging \
26          python3 python3-dev python3-setuptools python3-cffi python3-packaging
27    - name: Autogen.sh
28      run: |
29        sh autogen.sh
30    - name: Configure
31      run: |
32        ./configure --enable-debug --enable-debuginfo
33    - name: Make
34      run: |
35        make --no-print-directory -s pkg-utils pkg-kmod
36    - name: Install
37      run: |
38        sudo dpkg -i *.deb
39        # Update order of directories to search for modules, otherwise
40        #   Ubuntu will load kernel-shipped ones.
41        sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
42        sudo depmod
43        sudo modprobe zfs
44    - name: Tests
45      run: |
46        sudo mkdir -p $TEST_DIR
47        # run for 20 minutes to have a total runner time of 30 minutes
48        sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1 -- -T 120 -P 60
49    - name: Prepare artifacts
50      if: failure()
51      run: |
52        sudo chmod +r -R $TEST_DIR/
53    - uses: actions/upload-artifact@v2
54      if: failure()
55      with:
56        name: Logs
57        path: |
58          /var/tmp/zloop/*/
59          !/var/tmp/zloop/*/vdev/
60        if-no-files-found: ignore
61    - uses: actions/upload-artifact@v2
62      if: failure()
63      with:
64        name: Pool files
65        path: |
66          /var/tmp/zloop/*/vdev/
67        if-no-files-found: ignore
68