mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
add15e9539
- Move build dependencies moved to `.github/workflows/build-dependencies.txt` shared among workflows. - Change `ubuntu-latest` -> `ubuntu-20.04` to avoid unexpected runner environment updates in `zloop` workflow. - Change `ubuntu-20.04` -> `ubuntu-latest` to track changes in runner environment in `checkstyle` workflow. - Kernel buffer is flushed before ZTS invocation to avoid storing the same data after each test case run. - `make` is invoked with consistent set of options to reduce clutter in logs. Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #13037
77 lines
2.7 KiB
YAML
77 lines
2.7 KiB
YAML
name: zfs-tests-sanity
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt sudo apt-get install -qq
|
|
sudo apt-get clean
|
|
- name: Autogen.sh
|
|
run: |
|
|
./autogen.sh
|
|
- name: Configure
|
|
run: |
|
|
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
|
|
- name: Make
|
|
run: |
|
|
make -j$(nproc) --no-print-directory --silent 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
|
|
# Workaround for cloud-init bug
|
|
# see https://github.com/openzfs/zfs/issues/12644
|
|
FILE=/lib/udev/rules.d/10-cloud-init-hook-hotplug.rules
|
|
if [ -r "${FILE}" ]; then
|
|
HASH=$(md5sum "${FILE}" | awk '{ print $1 }')
|
|
if [ "${HASH}" = "121ff0ef1936cd2ef65aec0458a35772" ]; then
|
|
# Just shove a zd* exclusion right above the hotplug hook...
|
|
sudo sed -i -e s/'LABEL="cloudinit_hook"'/'KERNEL=="zd*", GOTO="cloudinit_end"\n&'/ "${FILE}"
|
|
sudo udevadm control --reload-rules
|
|
fi
|
|
fi
|
|
# Workaround to provide additional free space for testing.
|
|
# https://github.com/actions/virtual-environments/issues/2840
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf "/usr/local/share/boost"
|
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
- name: Clear the kernel ring buffer
|
|
run: |
|
|
sudo dmesg -c >/var/tmp/dmesg-prerun
|
|
- name: Tests
|
|
run: |
|
|
/usr/share/zfs/zfs-tests.sh -vR -s 3G -r sanity
|
|
timeout-minutes: 330
|
|
- name: Prepare artifacts
|
|
if: failure()
|
|
run: |
|
|
RESULTS_PATH=$(readlink -f /var/tmp/test_results/current)
|
|
sudo dmesg > $RESULTS_PATH/dmesg
|
|
sudo cp /var/log/syslog /var/tmp/dmesg-prerun $RESULTS_PATH/
|
|
sudo chmod +r $RESULTS_PATH/*
|
|
# Replace ':' in dir names, actions/upload-artifact doesn't support it
|
|
for f in $(find /var/tmp/test_results -name '*:*'); do mv "$f" "${f//:/__}"; done
|
|
- uses: actions/upload-artifact@v2
|
|
if: failure()
|
|
with:
|
|
name: Test logs Ubuntu-${{ matrix.os }}
|
|
path: |
|
|
/var/tmp/test_results/*
|
|
!/var/tmp/test_results/current
|
|
if-no-files-found: ignore
|