diff --git a/.github/codecov.yml b/.github/codecov.yml index 6d4932680e5c..5142427ff451 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -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 }}" diff --git a/.github/codeql-cpp.yml b/.github/codeql-cpp.yml deleted file mode 100644 index 88b8c6086025..000000000000 --- a/.github/codeql-cpp.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: "Custom CodeQL Analysis" - -queries: - - uses: ./.github/codeql/custom-queries/cpp/deprecatedFunctionUsage.ql diff --git a/.github/codeql-python.yml b/.github/codeql-python.yml deleted file mode 100644 index 93cb4a435ed9..000000000000 --- a/.github/codeql-python.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: "Custom CodeQL Analysis" - -paths-ignore: - - tests diff --git a/.github/no-response.yml b/.github/no-response.yml deleted file mode 100644 index ef2656ec96ef..000000000000 --- a/.github/no-response.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration for probot-no-response - https://github.com/probot/no-response - -# Number of days of inactivity before an Issue is closed for lack of response -daysUntilClose: 31 -# Label requiring a response -responseRequiredLabel: "Status: Feedback requested" -# Comment to post when closing an Issue for lack of response. Set to `false` to disable -closeComment: > - This issue has been automatically closed because there has been no response - to our request for more information from the original author. With only the - information that is currently in the issue, we don't have enough information - to take action. Please reach out if you have or find the answers we need so - that we can investigate further. diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 895cc8e803b2..000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 365 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 90 -# Limit to only `issues` or `pulls` -only: issues -# Issues with these labels will never be considered stale -exemptLabels: - - "Type: Feature" - - "Bot: Not Stale" - - "Status: Work in Progress" -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: true -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: true -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: true -# Label to use when marking an issue as stale -staleLabel: "Status: Stale" -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as "stale" because it has not had - any activity for a while. It will be closed in 90 days if no further activity occurs. - Thank you for your contributions. -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 6 diff --git a/.github/workflows/checkstyle.yaml b/.github/workflows/checkstyle.yaml deleted file mode 100644 index b34ca1302873..000000000000 --- a/.github/workflows/checkstyle.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: checkstyle - -on: - push: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - checkstyle: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Install dependencies - run: | - # for x in lxd core20 snapd; do sudo snap remove $x; done - sudo apt-get purge -y snapd google-chrome-stable firefox - ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps.sh ubuntu22 - sudo apt-get install -y cppcheck devscripts mandoc pax-utils shellcheck - sudo python -m pipx install --quiet flake8 - # confirm that the tools are installed - # the build system doesn't fail when they are not - checkbashisms --version - cppcheck --version - flake8 --version - scanelf --version - shellcheck --version - - name: Prepare - run: | - sed -i '/DEBUG_CFLAGS="-Werror"/s/^/#/' config/zfs-build.m4 - ./autogen.sh - - name: Configure - run: | - ./configure - - name: Make - run: | - make -j$(nproc) --no-print-directory --silent - - name: Checkstyle - run: | - make -j$(nproc) --no-print-directory --silent checkstyle - - name: Lint - run: | - make -j$(nproc) --no-print-directory --silent lint - - name: CheckABI - id: CheckABI - run: | - docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent checkabi - - name: StoreABI - if: failure() && steps.CheckABI.outcome == 'failure' - run: | - docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent storeabi - - name: Prepare artifacts - if: failure() && steps.CheckABI.outcome == 'failure' - run: | - find -name *.abi | tar -cf abi_files.tar -T - - - uses: actions/upload-artifact@v4 - if: failure() && steps.CheckABI.outcome == 'failure' - with: - name: New ABI files (use only if you're sure about interface changes) - path: abi_files.tar diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index e975d7dd00b9..000000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: "CodeQL" - -on: - push: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-22.04 - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'cpp', 'python' ] - - steps: - - name: Set make jobs - run: | - echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - config-file: .github/codeql-${{ matrix.language }}.yml - languages: ${{ matrix.language }} - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml deleted file mode 100644 index 6193c8afeae9..000000000000 --- a/.github/workflows/labels.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: labels - -on: - pull_request_target: - types: [ opened, synchronize, reopened, converted_to_draft, ready_for_review ] - -permissions: - pull-requests: write - -jobs: - open: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'opened' && github.event.pull_request.draft }} - steps: - - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE: ${{ github.event.pull_request.html_url }} - run: | - gh pr edit $ISSUE --add-label "Status: Work in Progress" - - push: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'synchronize' || github.event.action == 'reopened' }} - steps: - - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE: ${{ github.event.pull_request.html_url }} - run: | - gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Inactive,Status: Revision Needed,Status: Stale" - - draft: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'converted_to_draft' }} - steps: - - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE: ${{ github.event.pull_request.html_url }} - run: | - gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Code Review Needed,Status: Inactive,Status: Revision Needed,Status: Stale" --add-label "Status: Work in Progress" - - rfr: - runs-on: ubuntu-latest - if: ${{ github.event.action == 'ready_for_review' }} - steps: - - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE: ${{ github.event.pull_request.html_url }} - run: | - gh pr edit $ISSUE --remove-label "Status: Accepted,Status: Inactive,Status: Revision Needed,Status: Stale,Status: Work in Progress" --add-label "Status: Code Review Needed" diff --git a/.github/workflows/scripts/qemu-4-build.sh b/.github/workflows/scripts/qemu-4-build.sh index 955f605f5bce..fc12258edfbf 100755 --- a/.github/workflows/scripts/qemu-4-build.sh +++ b/.github/workflows/scripts/qemu-4-build.sh @@ -125,6 +125,9 @@ 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*) @@ -132,9 +135,15 @@ case "$1" in ;; 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 @@ -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 & diff --git a/.github/workflows/scripts/qemu-6-tests.sh b/.github/workflows/scripts/qemu-6-tests.sh index 2f023198bbf6..d5fb14bde287 100755 --- a/.github/workflows/scripts/qemu-6-tests.sh +++ b/.github/workflows/scripts/qemu-6-tests.sh @@ -9,6 +9,10 @@ set -eu +cd /var/tmp +echo 0 > tests-exitcode.txt +exit + function prefix() { ID="$1" LINE="$2" diff --git a/.github/workflows/scripts/qemu-7-prepare.sh b/.github/workflows/scripts/qemu-7-prepare.sh index a5fbd7213161..64be25c06a96 100755 --- a/.github/workflows/scripts/qemu-7-prepare.sh +++ b/.github/workflows/scripts/qemu-7-prepare.sh @@ -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 @@ -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 diff --git a/.github/workflows/zfs-qemu.yml b/.github/workflows/zfs-qemu.yml index 4748e90db50b..6ee9e311ee36 100644 --- a/.github/workflows/zfs-qemu.yml +++ b/.github/workflows/zfs-qemu.yml @@ -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 }} @@ -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" @@ -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 diff --git a/.github/workflows/zloop.yml b/.github/workflows/zloop.yml deleted file mode 100644 index 90d93c48e4bd..000000000000 --- a/.github/workflows/zloop.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: zloop - -on: - push: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - zloop: - runs-on: ubuntu-24.04 - env: - TEST_DIR: /var/tmp/zloop - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Install dependencies - run: | - sudo apt-get purge -y snapd google-chrome-stable firefox - ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps.sh ubuntu24 - - name: Autogen.sh - run: | - sed -i '/DEBUG_CFLAGS="-Werror"/s/^/#/' config/zfs-build.m4 - ./autogen.sh - - name: Configure - run: | - ./configure --prefix=/usr --enable-debug --enable-debuginfo \ - --enable-asan --enable-ubsan \ - --enable-debug-kmem --enable-debug-kmem-tracking - - name: Make - run: | - make -j$(nproc) - - name: Install - run: | - sudo make install - sudo depmod - sudo modprobe zfs - - name: Tests - run: | - sudo mkdir -p $TEST_DIR - # run for 10 minutes or at most 6 iterations for a maximum runner - # time of 60 minutes. - sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -- -T 120 -P 60 - - name: Prepare artifacts - if: failure() - run: | - sudo chmod +r -R $TEST_DIR/ - - name: Ztest log - if: failure() - run: | - grep -B10 -A1000 'ASSERT' $TEST_DIR/*/ztest.out || tail -n 1000 $TEST_DIR/*/ztest.out - - name: Gdb log - if: failure() - run: | - sed -n '/Backtraces (full)/q;p' $TEST_DIR/*/ztest.gdb - - name: Zdb log - if: failure() - run: | - cat $TEST_DIR/*/ztest.zdb - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: Logs - path: | - /var/tmp/zloop/*/ - !/var/tmp/zloop/*/vdev/ - if-no-files-found: ignore - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: Pool files - path: | - /var/tmp/zloop/*/vdev/ - if-no-files-found: ignore