]> git.proxmox.com Git - mirror_zfs.git/blame - .github/workflows/zfs-tests-functional.yml
Workaround cloud-init hotplug issue
[mirror_zfs.git] / .github / workflows / zfs-tests-functional.yml
CommitLineData
aa743acc
GM
1name: zfs-tests-functional
2
3on:
4 push:
5 pull_request:
6
7jobs:
8 tests-functional-ubuntu:
9 strategy:
10 fail-fast: false
11 matrix:
12 os: [18.04, 20.04]
13 runs-on: ubuntu-${{ matrix.os }}
14 steps:
15 - uses: actions/checkout@v2
16 with:
17 ref: ${{ github.event.pull_request.head.sha }}
18 - name: Install dependencies
19 run: |
20 sudo apt-get update
21 sudo apt-get install --yes -qq build-essential autoconf libtool gdb lcov \
22 git alien fakeroot wget curl bc fio acl \
23 sysstat mdadm lsscsi parted gdebi attr dbench watchdog ksh \
24 nfs-kernel-server samba rng-tools xz-utils \
25 zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
26 xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
27 libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
28 libpam0g-dev pamtester python-dev python-setuptools python-cffi \
08cd0717
RE
29 python-packaging python3 python3-dev python3-setuptools python3-cffi \
30 libcurl4-openssl-dev python3-packaging
aa743acc
GM
31 - name: Autogen.sh
32 run: |
33 sh autogen.sh
34 - name: Configure
35 run: |
36 ./configure --enable-debug --enable-debuginfo
37 - name: Make
38 run: |
39 make --no-print-directory -s pkg-utils pkg-kmod
40 - name: Install
41 run: |
42 sudo dpkg -i *.deb
43 # Update order of directories to search for modules, otherwise
44 # Ubuntu will load kernel-shipped ones.
45 sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
46 sudo depmod
47 sudo modprobe zfs
731fbb5d
RE
48 # Workaround for cloud-init bug
49 # see https://github.com/openzfs/zfs/issues/12644
50 FILE=/lib/udev/rules.d/10-cloud-init-hook-hotplug.rules
51 if [ -r "${FILE}" ]; then
52 HASH=$(md5sum "${FILE}" | awk '{ print $1 }')
53 if [ "${HASH}" = "121ff0ef1936cd2ef65aec0458a35772" ]; then
54 # Just shove a zd* exclusion right above the hotplug hook...
55 sudo sed -i -e s/'LABEL="cloudinit_hook"'/'KERNEL=="zd*", GOTO="cloudinit_end"\n&'/ "${FILE}"
56 sudo udevadm control --reload-rules
57 fi
58 fi
9f9e1b54
BB
59 # Workaround to provide additional free space for testing.
60 # https://github.com/actions/virtual-environments/issues/2840
61 sudo rm -rf /usr/share/dotnet
62 sudo rm -rf /opt/ghc
63 sudo rm -rf "/usr/local/share/boost"
64 sudo rm -rf "$AGENT_TOOLSDIRECTORY"
aa743acc
GM
65 - name: Tests
66 run: |
67 /usr/share/zfs/zfs-tests.sh -v -s 3G
68 - name: Prepare artifacts
69 if: failure()
70 run: |
71 RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
72 sudo dmesg > $RESULTS_PATH/dmesg
73 sudo cp /var/log/syslog $RESULTS_PATH/
74 sudo chmod +r $RESULTS_PATH/*
75 # Replace ':' in dir names, actions/upload-artifact doesn't support it
76 for f in $(find $RESULTS_PATH -name '*:*'); do mv "$f" "${f//:/__}"; done
77 - uses: actions/upload-artifact@v2
78 if: failure()
79 with:
80 name: Test logs Ubuntu-${{ matrix.os }}
81 path: /var/tmp/test_results/20*/
82 if-no-files-found: ignore