]> git.proxmox.com Git - mirror_zfs.git/blame - .github/workflows/zfs-tests-functional.yml
Removed Python 2 and Python 3.5- support
[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 \
8a7c4efd
DS
28 libpam0g-dev pamtester libcurl4-openssl-dev \
29 python3 python3-dev python3-setuptools python3-cffi python3-packaging
aa743acc
GM
30 - name: Autogen.sh
31 run: |
32 sh autogen.sh
33 - name: Configure
34 run: |
35 ./configure --enable-debug --enable-debuginfo
36 - name: Make
37 run: |
38 make --no-print-directory -s pkg-utils pkg-kmod
39 - name: Install
40 run: |
41 sudo dpkg -i *.deb
42 # Update order of directories to search for modules, otherwise
43 # Ubuntu will load kernel-shipped ones.
44 sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
45 sudo depmod
46 sudo modprobe zfs
731fbb5d
RE
47 # Workaround for cloud-init bug
48 # see https://github.com/openzfs/zfs/issues/12644
49 FILE=/lib/udev/rules.d/10-cloud-init-hook-hotplug.rules
50 if [ -r "${FILE}" ]; then
51 HASH=$(md5sum "${FILE}" | awk '{ print $1 }')
52 if [ "${HASH}" = "121ff0ef1936cd2ef65aec0458a35772" ]; then
53 # Just shove a zd* exclusion right above the hotplug hook...
54 sudo sed -i -e s/'LABEL="cloudinit_hook"'/'KERNEL=="zd*", GOTO="cloudinit_end"\n&'/ "${FILE}"
55 sudo udevadm control --reload-rules
56 fi
57 fi
9f9e1b54
BB
58 # Workaround to provide additional free space for testing.
59 # https://github.com/actions/virtual-environments/issues/2840
60 sudo rm -rf /usr/share/dotnet
61 sudo rm -rf /opt/ghc
62 sudo rm -rf "/usr/local/share/boost"
63 sudo rm -rf "$AGENT_TOOLSDIRECTORY"
aa743acc
GM
64 - name: Tests
65 run: |
2320e6eb 66 /usr/share/zfs/zfs-tests.sh -vR -s 3G
aa743acc
GM
67 - name: Prepare artifacts
68 if: failure()
69 run: |
70 RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
71 sudo dmesg > $RESULTS_PATH/dmesg
72 sudo cp /var/log/syslog $RESULTS_PATH/
73 sudo chmod +r $RESULTS_PATH/*
74 # Replace ':' in dir names, actions/upload-artifact doesn't support it
ddc026f5 75 for f in $(find /var/tmp/test_results -name '*:*'); do mv "$f" "${f//:/__}"; done
aa743acc
GM
76 - uses: actions/upload-artifact@v2
77 if: failure()
78 with:
79 name: Test logs Ubuntu-${{ matrix.os }}
80 path: /var/tmp/test_results/20*/
81 if-no-files-found: ignore