ZTS: Update deprecated Github Action version numbers

GitHub Actions is transitioning from Node 16 to Node 20.

So we need to update these:
- actions/checkout@v3 -> v4
- actions/download-artifact@v3 -> v4
- actions/upload-artifact@v3 -> v4 and some minor changes

Update also the documentation of the testings workflow.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Andrew Innes <andrew.c12@gmail.com>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #15820
This commit is contained in:
Tino Reichardt 2024-01-26 23:22:26 +01:00 committed by GitHub
parent e7af89d972
commit fb27698cfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 42 additions and 37 deletions

View File

@ -4,44 +4,49 @@
```mermaid ```mermaid
flowchart TB flowchart TB
subgraph CleanUp and Summary subgraph CleanUp and Summary
Part1-20.04-->CleanUp+nice+Summary sanity-checks-20.04-->CleanUp+Summary
Part2-20.04-->CleanUp+nice+Summary Part1-20.04-->CleanUp+Summary
PartN-20.04-->CleanUp+nice+Summary Part2-20.04-->CleanUp+Summary
Part1-22.04-->CleanUp+nice+Summary Part3-20.04-->CleanUp+Summary
Part2-22.04-->CleanUp+nice+Summary Part4-20.04-->CleanUp+Summary
PartN-22.04-->CleanUp+nice+Summary Part1-22.04-->CleanUp+Summary
Part2-22.04-->CleanUp+Summary
Part3-22.04-->CleanUp+Summary
Part4-22.04-->CleanUp+Summary
sanity-checks-22.04-->CleanUp+Summary
end end
subgraph Functional Testings subgraph Functional Testings
sanity-checks-20.04
zloop-checks-20.04
functional-testing-20.04-->Part1-20.04 functional-testing-20.04-->Part1-20.04
functional-testing-20.04-->Part2-20.04 functional-testing-20.04-->Part2-20.04
functional-testing-20.04-->PartN-20.04 functional-testing-20.04-->Part3-20.04
functional-testing-20.04-->Part4-20.04
functional-testing-22.04-->Part1-22.04 functional-testing-22.04-->Part1-22.04
functional-testing-22.04-->Part2-22.04 functional-testing-22.04-->Part2-22.04
functional-testing-22.04-->PartN-22.04 functional-testing-22.04-->Part3-22.04
end functional-testing-22.04-->Part4-22.04
sanity-checks-22.04
subgraph Sanity and zloop Testings zloop-checks-22.04
sanity-checks-20.04-->functional-testing-20.04
sanity-checks-22.04-->functional-testing-22.04
zloop-checks-20.04-->functional
zloop-checks-22.04-->functional
end end
subgraph Code Checking + Building subgraph Code Checking + Building
Build-Ubuntu-20.04-->sanity-checks-20.04
Build-Ubuntu-20.04-->zloop-checks-20.04
Build-Ubuntu-20.04-->functional-testing-20.04
codeql.yml codeql.yml
checkstyle.yml checkstyle.yml
Build-Ubuntu-20.04-->sanity-checks-20.04
Build-Ubuntu-22.04-->sanity-checks-22.04 Build-Ubuntu-22.04-->sanity-checks-22.04
Build-Ubuntu-20.04-->zloop-checks-20.04
Build-Ubuntu-22.04-->zloop-checks-22.04 Build-Ubuntu-22.04-->zloop-checks-22.04
Build-Ubuntu-22.04-->functional-testing-22.04
end end
``` ```
1) build zfs modules for Ubuntu 20.04 and 22.04 (~15m) 1) build zfs modules for Ubuntu 20.04 and 22.04 (~15m)
2) 2x zloop test (~10m) + 2x sanity test (~25m) 2) 2x zloop test (~10m) + 2x sanity test (~25m)
3) functional testings in parts 1..5 (each ~1h) 3) 4x functional testings in parts 1..4 (each ~1h)
4) cleanup and create summary 4) cleanup and create summary
- content of summary depends on the results of the steps - content of summary depends on the results of the steps

View File

@ -8,7 +8,7 @@ jobs:
checkstyle: checkstyle:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: Install dependencies - name: Install dependencies
@ -52,7 +52,7 @@ jobs:
if: failure() && steps.CheckABI.outcome == 'failure' if: failure() && steps.CheckABI.outcome == 'failure'
run: | run: |
find -name *.abi | tar -cf abi_files.tar -T - find -name *.abi | tar -cf abi_files.tar -T -
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: failure() && steps.CheckABI.outcome == 'failure' if: failure() && steps.CheckABI.outcome == 'failure'
with: with:
name: New ABI files (use only if you're sure about interface changes) name: New ABI files (use only if you're sure about interface changes)

View File

@ -24,7 +24,7 @@ jobs:
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2

View File

@ -87,7 +87,7 @@ function summarize_f() {
output "\n## $headline\n" output "\n## $headline\n"
rm -rf testfiles rm -rf testfiles
for i in $(seq 1 $FUNCTIONAL_PARTS); do for i in $(seq 1 $FUNCTIONAL_PARTS); do
tarfile="$2/part$i.tar" tarfile="$2-part$i/part$i.tar"
check_tarfile "$tarfile" check_tarfile "$tarfile"
check_logfile "testfiles/log" check_logfile "testfiles/log"
done done

View File

@ -13,10 +13,10 @@ jobs:
zloop: zloop:
runs-on: ubuntu-${{ inputs.os }} runs-on: ubuntu-${{ inputs.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: modules-${{ inputs.os }} name: modules-${{ inputs.os }}
- name: Install modules - name: Install modules
@ -34,7 +34,7 @@ jobs:
if: failure() if: failure()
run: | run: |
sudo chmod +r -R /var/tmp/zloop/ sudo chmod +r -R /var/tmp/zloop/
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: Zpool-logs-${{ inputs.os }} name: Zpool-logs-${{ inputs.os }}
@ -43,7 +43,7 @@ jobs:
!/var/tmp/zloop/*/vdev/ !/var/tmp/zloop/*/vdev/
retention-days: 14 retention-days: 14
if-no-files-found: ignore if-no-files-found: ignore
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: Zpool-files-${{ inputs.os }} name: Zpool-files-${{ inputs.os }}
@ -55,10 +55,10 @@ jobs:
sanity: sanity:
runs-on: ubuntu-${{ inputs.os }} runs-on: ubuntu-${{ inputs.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: modules-${{ inputs.os }} name: modules-${{ inputs.os }}
- name: Install modules - name: Install modules
@ -77,7 +77,7 @@ jobs:
RESPATH="/var/tmp/test_results" RESPATH="/var/tmp/test_results"
mv -f $RESPATH/current $RESPATH/testfiles mv -f $RESPATH/current $RESPATH/testfiles
tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles tar cf $RESPATH/sanity.tar -h -C $RESPATH testfiles
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: success() || failure() if: success() || failure()
with: with:
name: Logs-${{ inputs.os }}-sanity name: Logs-${{ inputs.os }}-sanity
@ -91,10 +91,10 @@ jobs:
matrix: matrix:
tests: [ part1, part2, part3, part4 ] tests: [ part1, part2, part3, part4 ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: modules-${{ inputs.os }} name: modules-${{ inputs.os }}
- name: Install modules - name: Install modules
@ -116,9 +116,9 @@ jobs:
RESPATH="/var/tmp/test_results" RESPATH="/var/tmp/test_results"
mv -f $RESPATH/current $RESPATH/testfiles mv -f $RESPATH/current $RESPATH/testfiles
tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles tar cf $RESPATH/${{ matrix.tests }}.tar -h -C $RESPATH testfiles
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: success() || failure() if: success() || failure()
with: with:
name: Logs-${{ inputs.os }}-functional name: Logs-${{ inputs.os }}-functional-${{ matrix.tests }}
path: /var/tmp/test_results/${{ matrix.tests }}.tar path: /var/tmp/test_results/${{ matrix.tests }}.tar
if-no-files-found: ignore if-no-files-found: ignore

View File

@ -14,14 +14,14 @@ jobs:
os: [20.04, 22.04] os: [20.04, 22.04]
runs-on: ubuntu-${{ matrix.os }} runs-on: ubuntu-${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- name: Build modules - name: Build modules
run: .github/workflows/scripts/setup-dependencies.sh build run: .github/workflows/scripts/setup-dependencies.sh build
- name: Prepare modules upload - name: Prepare modules upload
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github tests/test-runner tests/ImageOS.txt run: tar czf modules-${{ matrix.os }}.tgz *.deb .github tests/test-runner tests/ImageOS.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: modules-${{ matrix.os }} name: modules-${{ matrix.os }}
path: modules-${{ matrix.os }}.tgz path: modules-${{ matrix.os }}.tgz
@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: testings needs: testings
steps: steps:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
- name: Generating summary - name: Generating summary
run: | run: |
tar xzf modules-22.04/modules-22.04.tgz .github tests tar xzf modules-22.04/modules-22.04.tgz .github tests
@ -58,7 +58,7 @@ jobs:
run: .github/workflows/scripts/generate-summary.sh 3 run: .github/workflows/scripts/generate-summary.sh 3
- name: Summary for errors #4 - name: Summary for errors #4
run: .github/workflows/scripts/generate-summary.sh 4 run: .github/workflows/scripts/generate-summary.sh 4
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: Summary Files name: Summary Files
path: Summary/ path: Summary/