From eec8b9b929dc3fda4908caec56df0e401e73f114 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Tue, 14 Apr 2026 13:20:46 -0700 Subject: [PATCH] CI: Disable ZIP file artifacts, update versions The GH artifacts action now lets you disable auto-zipping your artifacts. Previously, GH would always automatically put your artifacts in a ZIP file. This is annoying when your artifacts are already in a tarball. Also update the following action versions checkout: v4 -> v6 upload-artifact: v4 -> v7 download-artifact: v4 -> v8 Lastly, fix a issue where zfs-qmeu-packages now needs to power cycle the VM. Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Tony Hutter Closes #18411 --- .github/workflows/checkstyle.yaml | 7 +++--- .github/workflows/codeql.yml | 2 +- .github/workflows/scripts/qemu-7-prepare.sh | 22 ++++++++++++++++-- .../workflows/scripts/qemu-9-summary-page.sh | 4 +++- .github/workflows/smatch.yml | 4 ++-- .github/workflows/zfs-qemu-packages.yml | 23 ++++++++++--------- .github/workflows/zfs-qemu.yml | 16 +++++++------ .github/workflows/zloop.yml | 6 ++--- 8 files changed, 54 insertions(+), 30 deletions(-) diff --git a/.github/workflows/checkstyle.yaml b/.github/workflows/checkstyle.yaml index a01a4fe85..ddcc2b858 100644 --- a/.github/workflows/checkstyle.yaml +++ b/.github/workflows/checkstyle.yaml @@ -56,9 +56,10 @@ jobs: - name: Prepare artifacts if: failure() && steps.CheckABI.outcome == 'failure' run: | - find -name *.abi | tar -cf abi_files.tar -T - - - uses: actions/upload-artifact@v4 + find -name *.abi | tar -cjf abi_files.tar.bz2 -T - + - uses: actions/upload-artifact@v7 if: failure() && steps.CheckABI.outcome == 'failure' with: name: New ABI files (use only if you're sure about interface changes) - path: abi_files.tar + path: abi_files.tar.bz2 + archive: false diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e975d7dd0..689fe71fd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,7 +28,7 @@ jobs: echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/scripts/qemu-7-prepare.sh b/.github/workflows/scripts/qemu-7-prepare.sh index 98a5c24c2..5e18f4bf4 100755 --- a/.github/workflows/scripts/qemu-7-prepare.sh +++ b/.github/workflows/scripts/qemu-7-prepare.sh @@ -13,16 +13,29 @@ source env.txt mkdir -p $RESPATH +TARNAME=qemu-$OS + # check if building the module has failed if [ -z ${VMs:-} ]; then cd $RESPATH echo ":exclamation: ZFS module didn't build successfully :exclamation:" \ | tee summary.txt | tee /tmp/summary.txt cp /var/tmp/*.txt . - tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true + + # rename /var/tmp/test_results to /var/tmp/qemu-$OS + mv $RESPATH $(dirname $RESPATH)/$TARNAME + tar cjf /tmp/$TARNAME.tar.bz2 -C $(dirname $RESPATH) -h $TARNAME || true + # move it back to /var/tmp/test_results (needed for next script) + mv $(dirname $RESPATH)/$TARNAME $RESPATH + exit 0 fi +if ! grep -q vm /etc/hosts ; then + echo "No vm* hostnames, VMs probably didn't startup" + exit 0 +fi + # build was okay BASE="$HOME/work/zfs/zfs" MERGE="$BASE/.github/workflows/scripts/merge_summary.awk" @@ -121,4 +134,9 @@ if [ ! -s uname.txt ]; then fi # artifact ready now -tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true +# +# rename /var/tmp/test_results to /var/tmp/qemu-$OS +mv $RESPATH $(dirname $RESPATH)/$TARNAME +tar cjf /tmp/$TARNAME.tar.bz2 -C $(dirname $RESPATH) -h $TARNAME || true +# move it back to /var/tmp/test_results (needed for next script) +mv $(dirname $RESPATH)/$TARNAME $RESPATH diff --git a/.github/workflows/scripts/qemu-9-summary-page.sh b/.github/workflows/scripts/qemu-9-summary-page.sh index 737dda01b..1200f4de2 100755 --- a/.github/workflows/scripts/qemu-9-summary-page.sh +++ b/.github/workflows/scripts/qemu-9-summary-page.sh @@ -33,7 +33,9 @@ function send2github() { # first call, generate all summaries if [ ! -f out-1.md ]; then logfile="1" - for tarfile in Logs-functional-*/qemu-*.tar; do + # The bz2 files are put into directories with the same name, like: + # "qemu-debian12.tar.bz2/qemu-debian12.tar.bz2" + for tarfile in qemu-*.tar.bz2/qemu-*.tar.bz2; do rm -rf vm* *.txt if [ ! -s "$tarfile" ]; then output "\n## Functional Tests: unknown\n" diff --git a/.github/workflows/smatch.yml b/.github/workflows/smatch.yml index ac6454244..305a1f017 100644 --- a/.github/workflows/smatch.yml +++ b/.github/workflows/smatch.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout smatch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: error27/smatch ref: master @@ -26,7 +26,7 @@ jobs: cd $GITHUB_WORKSPACE/smatch make -j$(nproc) - name: Checkout OpenZFS - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} path: zfs diff --git a/.github/workflows/zfs-qemu-packages.yml b/.github/workflows/zfs-qemu-packages.yml index 537223586..88d85a06d 100644 --- a/.github/workflows/zfs-qemu-packages.yml +++ b/.github/workflows/zfs-qemu-packages.yml @@ -61,7 +61,7 @@ jobs: os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora42', 'fedora43'] runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} @@ -73,7 +73,7 @@ jobs: - name: Install dependencies run: | - .github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }} + .github/workflows/scripts/qemu-3-deps.sh --poweroff ${{ matrix.os }} - name: Build modules or Test repo run: | @@ -104,17 +104,18 @@ jobs: run: | rsync -a zfs@vm0:/tmp/repo /tmp || true .github/workflows/scripts/replace-dupes-with-symlinks.sh /tmp/repo - tar -cf ${{ matrix.os }}-repo.tar -C /tmp repo + tar -cjf ${{ matrix.os }}-repo.tar.bz2 -C /tmp repo - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 id: artifact-upload if: always() with: name: ${{ matrix.os }}-repo - path: ${{ matrix.os }}-repo.tar + path: ${{ matrix.os }}-repo.tar.bz2 compression-level: 0 retention-days: 2 if-no-files-found: ignore + archive: false combine_repos: if: always() @@ -122,16 +123,16 @@ jobs: name: "Results" runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 id: artifact-download if: always() - name: Test Summary if: always() run: | - for i in $(find . -type f -iname "*.tar") ; do + for i in $(find . -type f -iname "*.tar.bz2") ; do tar -xf $i -C /tmp done - tar -cf all-repo.tar -C /tmp repo + tar -cjf all-repo.tar.bz2 -C /tmp repo # If we're installing from a repo, print out the summary of the versions # that got installed using Markdown. @@ -146,12 +147,12 @@ jobs: done fi - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 id: artifact-upload2 if: always() with: name: all-repo - path: all-repo.tar - compression-level: 0 + path: all-repo.tar.bz2 retention-days: 5 if-no-files-found: ignore + archive: false diff --git a/.github/workflows/zfs-qemu.yml b/.github/workflows/zfs-qemu.yml index 7a86b955a..f83b319a3 100644 --- a/.github/workflows/zfs-qemu.yml +++ b/.github/workflows/zfs-qemu.yml @@ -28,7 +28,7 @@ jobs: test_os: ${{ steps.os.outputs.os }} ci_type: ${{ steps.os.outputs.ci_type }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - name: Generate OS config and CI type @@ -104,7 +104,7 @@ jobs: os: ${{ fromJson(needs.test-config.outputs.test_os) }} runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} @@ -139,12 +139,13 @@ jobs: timeout-minutes: 10 run: .github/workflows/scripts/qemu-7-prepare.sh - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 id: artifact-upload if: always() with: name: Logs-functional-${{ matrix.os }} - path: /tmp/qemu-${{ matrix.os }}.tar + path: /tmp/qemu-${{ matrix.os }}.tar.bz2 + archive: false if-no-files-found: ignore - name: Test Summary @@ -158,10 +159,10 @@ jobs: needs: [ qemu-vm ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 - name: Generating summary run: .github/workflows/scripts/qemu-9-summary-page.sh - name: Generating summary... @@ -200,7 +201,8 @@ jobs: run: .github/workflows/scripts/qemu-9-summary-page.sh 18 - name: Generating summary... run: .github/workflows/scripts/qemu-9-summary-page.sh 19 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: Summary Files path: out-* + archive: true diff --git a/.github/workflows/zloop.yml b/.github/workflows/zloop.yml index 84bd508e2..7f76a670a 100644 --- a/.github/workflows/zloop.yml +++ b/.github/workflows/zloop.yml @@ -15,7 +15,7 @@ jobs: WORK_DIR: /mnt/zloop CORE_DIR: /mnt/zloop/cores steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} - name: Install dependencies @@ -61,7 +61,7 @@ jobs: if: failure() run: | cat $CORE_DIR/*/ztest.zdb - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: failure() with: name: Logs @@ -69,7 +69,7 @@ jobs: /mnt/zloop/*/ !/mnt/zloop/cores/*/vdev/ if-no-files-found: ignore - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: failure() with: name: Pool files