Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhutter committed Dec 20, 2024
1 parent 219a89c commit 3511776
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 308 deletions.
45 changes: 23 additions & 22 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
codecov:
notify:
require_ci_to_pass: false # always post
after_n_builds: 2 # user and kernel
name: Mixed inputs

coverage:
precision: 0 # 0 decimals of precision
round: nearest # Round to nearest precision point
range: "50...90" # red -> yellow -> green
on:
workflow_dispatch:
inputs:
name:
type: choice
description: Who to greet
options:
- monalisa
- cschleiden
message:
required: true
use-emoji:
type: boolean
description: Include 🎉🤣 emojis
environment:
type: environment

status:
project:
default:
threshold: 1% # allow 1% coverage variance
jobs:
greet:
runs-on: ubuntu-latest

patch:
default:
threshold: 1% # allow 1% coverage variance

comment:
layout: "reach, diff, flags, footer"
behavior: once # update if exists; post new; skip if deleted
require_changes: yes # only post when coverage changes

# ignore: Please place any ignores in config/ax_code_coverage.m4 instead
steps:
- name: Send greeting
run: echo "${{ github.event.inputs.message }} ${{ fromJSON('["", "🥳"]')[github.event.inputs.use-emoji == 'true'] }} ${{ github.event.inputs.name }}"
4 changes: 0 additions & 4 deletions .github/codeql-cpp.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/codeql-python.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/no-response.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/stale.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/checkstyle.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/codeql.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/labels.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/scripts/qemu-4-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,25 @@ uname -a > /var/tmp/uname.txt
cd $HOME/zfs
export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"

save_rpms=$2
echo "2 is $2, $save_rpms"

# build
case "$1" in
freebsd*)
freebsd
;;
alma*|centos*)
rpm_build_and_install "--with-spec=redhat"
if [ "$save_rpms" == "true" ] ; then
make rpm-dkms
fi
;;
fedora*)
rpm_build_and_install
if [ "$save_rpms" == "true" ] ; then
make rpm-dkms
fi
;;
debian*|ubuntu*)
deb_build_and_install
Expand All @@ -144,9 +153,15 @@ case "$1" in
;;
esac



# building the zfs module was ok
echo 0 > /var/tmp/build-exitcode.txt

if [ $save_rpms == "true" ] ; then
cp *.rpm /var/tmp
fi

# reset cloud-init configuration and poweroff
sudo cloud-init clean --logs
sync && sleep 2 && sudo poweroff &
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/scripts/qemu-6-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

set -eu

cd /var/tmp
echo 0 > tests-exitcode.txt
exit

function prefix() {
ID="$1"
LINE="$2"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/scripts/qemu-7-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ source env.txt

mkdir -p $RESPATH

echo "1 is $1, 2 is $2"
if [ "$1" == "true" ] ; then
save_rpms=true
fi

# check if building the module has failed
if [ -z ${VMs:-} ]; then
cd $RESPATH
Expand Down Expand Up @@ -119,5 +124,9 @@ if [ ! -s uname.txt ]; then
echo ":interrobang: Panic - where is my uname.txt?" > uname.txt
fi

if [ "$save_rpms" == "true" ] ; then
cp $BASE/*.rpm $RESPATH
fi

# artifact ready now
tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true
15 changes: 11 additions & 4 deletions .github/workflows/zfs-qemu.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: zfs-qemu

on:
push:
pull_request:
# push:
# pull_request:
workflow_dispatch:
inputs:
save_rpms:
type: boolean
required: false
default: false
description: 'Build DKMS & KMOD RPMs and save to artifacts'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -22,7 +29,7 @@ jobs:
- name: Generate OS config and CI type
id: os
run: |
FULL_OS='["almalinux8", "almalinux9", "centos-stream9", "debian11", "debian12", "fedora40", "fedora41", "freebsd13-3r", "freebsd13-4s", "freebsd14-1r", "freebsd14-2s", "freebsd15-0c", "ubuntu20", "ubuntu22", "ubuntu24"]'
FULL_OS='["almalinux8", "almalinux9", "fedora40", "fedora41"]'
QUICK_OS='["almalinux8", "almalinux9", "debian12", "fedora41", "freebsd13-3r", "freebsd14-2r", "ubuntu24"]'
# determine CI type when running on PR
ci_type="full"
Expand Down Expand Up @@ -94,7 +101,7 @@ jobs:
ssh 2>/dev/null zfs@$IP "uname -a" && break
done
rsync -ar $HOME/work/zfs/zfs zfs@$IP:./
ssh zfs@$IP '$HOME/zfs/.github/workflows/scripts/qemu-4-build.sh' ${{ matrix.os }}
ssh zfs@$IP '$HOME/zfs/.github/workflows/scripts/qemu-4-build.sh' ${{ matrix.os }} ${{ inputs.save_rpms }}
- name: Setup testing machines
timeout-minutes: 5
Expand Down
Loading

0 comments on commit 3511776

Please sign in to comment.