xref: /freebsd/sys/contrib/openzfs/.github/workflows/zloop.yml (revision 13ec1e3155c7e9bf037b12af186351b7fa9b9450)
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          python3 python3-dev python3-setuptools python3-cffi python3-packaging
26    - name: Autogen.sh
27      run: |
28        sh autogen.sh
29    - name: Configure
30      run: |
31        ./configure --enable-debug --enable-debuginfo
32    - name: Make
33      run: |
34        make --no-print-directory -s pkg-utils pkg-kmod
35    - name: Install
36      run: |
37        sudo dpkg -i *.deb
38        # Update order of directories to search for modules, otherwise
39        #   Ubuntu will load kernel-shipped ones.
40        sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
41        sudo depmod
42        sudo modprobe zfs
43    - name: Tests
44      run: |
45        sudo mkdir -p $TEST_DIR
46        # run for 20 minutes to have a total runner time of 30 minutes
47        sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1 -- -T 120 -P 60
48    - name: Prepare artifacts
49      if: failure()
50      run: |
51        sudo chmod +r -R $TEST_DIR/
52    - uses: actions/upload-artifact@v2
53      if: failure()
54      with:
55        name: Logs
56        path: |
57          /var/tmp/zloop/*/
58          !/var/tmp/zloop/*/vdev/
59        if-no-files-found: ignore
60    - uses: actions/upload-artifact@v2
61      if: failure()
62      with:
63        name: Pool files
64        path: |
65          /var/tmp/zloop/*/vdev/
66        if-no-files-found: ignore
67