2020-12-08 18:40:44 +00:00
|
|
|
name: zloop
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tests:
|
2023-03-02 22:53:34 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2020-12-08 18:40:44 +00:00
|
|
|
env:
|
|
|
|
TEST_DIR: /var/tmp/zloop
|
|
|
|
steps:
|
2022-10-11 19:59:06 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-12-08 18:40:44 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-03-02 22:58:21 +00:00
|
|
|
# https://github.com/orgs/community/discussions/47863
|
|
|
|
sudo apt-mark hold grub-efi-amd64-signed
|
|
|
|
sudo apt-get update --fix-missing
|
|
|
|
sudo apt-get upgrade
|
2023-03-03 00:18:27 +00:00
|
|
|
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
|
|
|
sudo apt-get clean
|
2020-12-08 18:40:44 +00:00
|
|
|
- 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
|
2023-03-03 00:18:27 +00:00
|
|
|
# run for 10 minutes or at most 2 iterations for a maximum runner
|
|
|
|
# time of 20 minutes.
|
|
|
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 2 -l -m1 -- -T 120 -P 60
|
2020-12-08 18:40:44 +00:00
|
|
|
- name: Prepare artifacts
|
|
|
|
if: failure()
|
|
|
|
run: |
|
|
|
|
sudo chmod +r -R $TEST_DIR/
|
2022-10-12 06:33:38 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2020-12-08 18:40:44 +00:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Logs
|
|
|
|
path: |
|
|
|
|
/var/tmp/zloop/*/
|
|
|
|
!/var/tmp/zloop/*/vdev/
|
|
|
|
if-no-files-found: ignore
|
2022-10-12 06:33:38 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2020-12-08 18:40:44 +00:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: Pool files
|
|
|
|
path: |
|
|
|
|
/var/tmp/zloop/*/vdev/
|
|
|
|
if-no-files-found: ignore
|