Skip to content

Commit 6692b6e

Browse files
authored
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 <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18411
1 parent 9bf1a72 commit 6692b6e

File tree

8 files changed

+54
-30
lines changed

8 files changed

+54
-30
lines changed

.github/workflows/checkstyle.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ jobs:
5656
- name: Prepare artifacts
5757
if: failure() && steps.CheckABI.outcome == 'failure'
5858
run: |
59-
find -name *.abi | tar -cf abi_files.tar -T -
60-
- uses: actions/upload-artifact@v4
59+
find -name *.abi | tar -cjf abi_files.tar.bz2 -T -
60+
- uses: actions/upload-artifact@v7
6161
if: failure() && steps.CheckABI.outcome == 'failure'
6262
with:
6363
name: New ABI files (use only if you're sure about interface changes)
64-
path: abi_files.tar
64+
path: abi_files.tar.bz2
65+
archive: false

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
2929
3030
- name: Checkout repository
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3232

3333
- name: Initialize CodeQL
3434
uses: github/codeql-action/init@v3

.github/workflows/scripts/qemu-7-prepare.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,29 @@ source env.txt
1313

1414
mkdir -p $RESPATH
1515

16+
TARNAME=qemu-$OS
17+
1618
# check if building the module has failed
1719
if [ -z ${VMs:-} ]; then
1820
cd $RESPATH
1921
echo ":exclamation: ZFS module didn't build successfully :exclamation:" \
2022
| tee summary.txt | tee /tmp/summary.txt
2123
cp /var/tmp/*.txt .
22-
tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true
24+
25+
# rename /var/tmp/test_results to /var/tmp/qemu-$OS
26+
mv $RESPATH $(dirname $RESPATH)/$TARNAME
27+
tar cjf /tmp/$TARNAME.tar.bz2 -C $(dirname $RESPATH) -h $TARNAME || true
28+
# move it back to /var/tmp/test_results (needed for next script)
29+
mv $(dirname $RESPATH)/$TARNAME $RESPATH
30+
2331
exit 0
2432
fi
2533

34+
if ! grep -q vm /etc/hosts ; then
35+
echo "No vm* hostnames, VMs probably didn't startup"
36+
exit 0
37+
fi
38+
2639
# build was okay
2740
BASE="$HOME/work/zfs/zfs"
2841
MERGE="$BASE/.github/workflows/scripts/merge_summary.awk"
@@ -121,4 +134,9 @@ if [ ! -s uname.txt ]; then
121134
fi
122135

123136
# artifact ready now
124-
tar cf /tmp/qemu-$OS.tar -C $RESPATH -h . || true
137+
#
138+
# rename /var/tmp/test_results to /var/tmp/qemu-$OS
139+
mv $RESPATH $(dirname $RESPATH)/$TARNAME
140+
tar cjf /tmp/$TARNAME.tar.bz2 -C $(dirname $RESPATH) -h $TARNAME || true
141+
# move it back to /var/tmp/test_results (needed for next script)
142+
mv $(dirname $RESPATH)/$TARNAME $RESPATH

.github/workflows/scripts/qemu-9-summary-page.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ function send2github() {
3333
# first call, generate all summaries
3434
if [ ! -f out-1.md ]; then
3535
logfile="1"
36-
for tarfile in Logs-functional-*/qemu-*.tar; do
36+
# The bz2 files are put into directories with the same name, like:
37+
# "qemu-debian12.tar.bz2/qemu-debian12.tar.bz2"
38+
for tarfile in qemu-*.tar.bz2/qemu-*.tar.bz2; do
3739
rm -rf vm* *.txt
3840
if [ ! -s "$tarfile" ]; then
3941
output "\n## Functional Tests: unknown\n"

.github/workflows/smatch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Checkout smatch
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717
with:
1818
repository: error27/smatch
1919
ref: master
@@ -26,7 +26,7 @@ jobs:
2626
cd $GITHUB_WORKSPACE/smatch
2727
make -j$(nproc)
2828
- name: Checkout OpenZFS
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
ref: ${{ github.event.pull_request.head.sha }}
3232
path: zfs

.github/workflows/zfs-qemu-packages.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
os: ['almalinux8', 'almalinux9', 'almalinux10', 'fedora42', 'fedora43']
6262
runs-on: ubuntu-24.04
6363
steps:
64-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v6
6565
with:
6666
ref: ${{ github.event.pull_request.head.sha }}
6767

@@ -73,7 +73,7 @@ jobs:
7373

7474
- name: Install dependencies
7575
run: |
76-
.github/workflows/scripts/qemu-3-deps.sh ${{ matrix.os }}
76+
.github/workflows/scripts/qemu-3-deps.sh --poweroff ${{ matrix.os }}
7777
7878
- name: Build modules or Test repo
7979
run: |
@@ -104,34 +104,35 @@ jobs:
104104
run: |
105105
rsync -a zfs@vm0:/tmp/repo /tmp || true
106106
.github/workflows/scripts/replace-dupes-with-symlinks.sh /tmp/repo
107-
tar -cf ${{ matrix.os }}-repo.tar -C /tmp repo
107+
tar -cjf ${{ matrix.os }}-repo.tar.bz2 -C /tmp repo
108108
109-
- uses: actions/upload-artifact@v4
109+
- uses: actions/upload-artifact@v7
110110
id: artifact-upload
111111
if: always()
112112
with:
113113
name: ${{ matrix.os }}-repo
114-
path: ${{ matrix.os }}-repo.tar
114+
path: ${{ matrix.os }}-repo.tar.bz2
115115
compression-level: 0
116116
retention-days: 2
117117
if-no-files-found: ignore
118+
archive: false
118119

119120
combine_repos:
120121
if: always()
121122
needs: [zfs-qemu-packages-jobs]
122123
name: "Results"
123124
runs-on: ubuntu-latest
124125
steps:
125-
- uses: actions/download-artifact@v4
126+
- uses: actions/download-artifact@v8
126127
id: artifact-download
127128
if: always()
128129
- name: Test Summary
129130
if: always()
130131
run: |
131-
for i in $(find . -type f -iname "*.tar") ; do
132+
for i in $(find . -type f -iname "*.tar.bz2") ; do
132133
tar -xf $i -C /tmp
133134
done
134-
tar -cf all-repo.tar -C /tmp repo
135+
tar -cjf all-repo.tar.bz2 -C /tmp repo
135136
136137
# If we're installing from a repo, print out the summary of the versions
137138
# that got installed using Markdown.
@@ -146,12 +147,12 @@ jobs:
146147
done
147148
fi
148149
149-
- uses: actions/upload-artifact@v4
150+
- uses: actions/upload-artifact@v7
150151
id: artifact-upload2
151152
if: always()
152153
with:
153154
name: all-repo
154-
path: all-repo.tar
155-
compression-level: 0
155+
path: all-repo.tar.bz2
156156
retention-days: 5
157157
if-no-files-found: ignore
158+
archive: false

.github/workflows/zfs-qemu.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
test_os: ${{ steps.os.outputs.os }}
2929
ci_type: ${{ steps.os.outputs.ci_type }}
3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v6
3232
with:
3333
fetch-depth: 0
3434
- name: Generate OS config and CI type
@@ -104,7 +104,7 @@ jobs:
104104
os: ${{ fromJson(needs.test-config.outputs.test_os) }}
105105
runs-on: ubuntu-24.04
106106
steps:
107-
- uses: actions/checkout@v4
107+
- uses: actions/checkout@v6
108108
with:
109109
ref: ${{ github.event.pull_request.head.sha }}
110110

@@ -139,12 +139,13 @@ jobs:
139139
timeout-minutes: 10
140140
run: .github/workflows/scripts/qemu-7-prepare.sh
141141

142-
- uses: actions/upload-artifact@v4
142+
- uses: actions/upload-artifact@v7
143143
id: artifact-upload
144144
if: always()
145145
with:
146146
name: Logs-functional-${{ matrix.os }}
147-
path: /tmp/qemu-${{ matrix.os }}.tar
147+
path: /tmp/qemu-${{ matrix.os }}.tar.bz2
148+
archive: false
148149
if-no-files-found: ignore
149150

150151
- name: Test Summary
@@ -158,10 +159,10 @@ jobs:
158159
needs: [ qemu-vm ]
159160

160161
steps:
161-
- uses: actions/checkout@v4
162+
- uses: actions/checkout@v6
162163
with:
163164
ref: ${{ github.event.pull_request.head.sha }}
164-
- uses: actions/download-artifact@v4
165+
- uses: actions/download-artifact@v8
165166
- name: Generating summary
166167
run: .github/workflows/scripts/qemu-9-summary-page.sh
167168
- name: Generating summary...
@@ -200,7 +201,8 @@ jobs:
200201
run: .github/workflows/scripts/qemu-9-summary-page.sh 18
201202
- name: Generating summary...
202203
run: .github/workflows/scripts/qemu-9-summary-page.sh 19
203-
- uses: actions/upload-artifact@v4
204+
- uses: actions/upload-artifact@v7
204205
with:
205206
name: Summary Files
206207
path: out-*
208+
archive: true

.github/workflows/zloop.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
WORK_DIR: /mnt/zloop
1616
CORE_DIR: /mnt/zloop/cores
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
with:
2020
ref: ${{ github.event.pull_request.head.sha }}
2121
- name: Install dependencies
@@ -61,15 +61,15 @@ jobs:
6161
if: failure()
6262
run: |
6363
cat $CORE_DIR/*/ztest.zdb
64-
- uses: actions/upload-artifact@v4
64+
- uses: actions/upload-artifact@v7
6565
if: failure()
6666
with:
6767
name: Logs
6868
path: |
6969
/mnt/zloop/*/
7070
!/mnt/zloop/cores/*/vdev/
7171
if-no-files-found: ignore
72-
- uses: actions/upload-artifact@v4
72+
- uses: actions/upload-artifact@v7
7373
if: failure()
7474
with:
7575
name: Pool files

0 commit comments

Comments
 (0)