aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/zloop.yml
blob: 30785b14507a0764b51f6301941eadb086b80173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: zloop

on:
  push:
  pull_request:

jobs:
  tests:
    runs-on: ubuntu-latest
    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
        sudo apt-get install --yes -qq build-essential autoconf libtool gdb \
          git alien fakeroot \
          zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
          xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
          libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
          libpam0g-dev \
          python-dev python-setuptools python-cffi \
          python3 python3-dev python3-setuptools python3-cffi
    - name: Autogen.sh
      run: |
        sh autogen.sh
    - name: Configure
      run: |
        ./configure --enable-debug --enable-debuginfo
    - name: Make
      run: |
        make --no-print-directory -s pkg-utils pkg-kmod
    - 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
        # run for 20 minutes to have a total runner time of 30 minutes
        sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1
    - 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