xref: /freebsd/sys/contrib/openzfs/.github/workflows/zloop.yml (revision 6e563a1b608438504d963c2d7c70e50d2e75af46)
1name: zloop
2
3on:
4  push:
5  pull_request:
6
7jobs:
8  tests:
9    runs-on: ubuntu-20.04
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        xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
20        sudo apt-get clean
21    - name: Autogen.sh
22      run: |
23        ./autogen.sh
24    - name: Configure
25      run: |
26        ./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
27    - name: Make
28      run: |
29        make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
30    - name: Install
31      run: |
32        sudo dpkg -i *.deb
33        # Update order of directories to search for modules, otherwise
34        #   Ubuntu will load kernel-shipped ones.
35        sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
36        sudo depmod
37        sudo modprobe zfs
38    - name: Tests
39      run: |
40        sudo mkdir -p $TEST_DIR
41        # run for 20 minutes to have a total runner time of 30 minutes
42        sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1 -- -T 120 -P 60
43    - name: Prepare artifacts
44      if: failure()
45      run: |
46        sudo chmod +r -R $TEST_DIR/
47    - uses: actions/upload-artifact@v2
48      if: failure()
49      with:
50        name: Logs
51        path: |
52          /var/tmp/zloop/*/
53          !/var/tmp/zloop/*/vdev/
54        if-no-files-found: ignore
55    - uses: actions/upload-artifact@v2
56      if: failure()
57      with:
58        name: Pool files
59        path: |
60          /var/tmp/zloop/*/vdev/
61        if-no-files-found: ignore
62