mirror_zfs/.github/workflows/zfs-linux.yml

72 lines
1.9 KiB
YAML
Raw Normal View History

name: zfs-linux
on:
push:
pull_request:
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [20.04, 22.04]
runs-on: ubuntu-${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Build modules
run: .github/workflows/scripts/setup-dependencies.sh build
- name: Prepare modules upload
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github scripts/zfs-tests-color.sh tests/test-runner tests/ImageOS.txt
- uses: actions/upload-artifact@v3
with:
name: modules-${{ matrix.os }}
path: modules-${{ matrix.os }}.tgz
- name: Prepare scripts upload
run: tar czf scripts.tgz .github tests/test-runner
- uses: actions/upload-artifact@v3
with:
name: scripts
path: scripts.tgz
testings:
name: Testing
strategy:
fail-fast: false
matrix:
os: [20.04, 22.04]
needs: build
uses: ./.github/workflows/zfs-linux-tests.yml
with:
os: ${{ matrix.os }}
cleanup:
if: always()
name: Cleanup
runs-on: ubuntu-22.04
needs: testings
steps:
- uses: actions/download-artifact@v3
- name: Generating summary
run: |
tar xzf scripts/scripts.tgz .github tests
.github/workflows/scripts/generate-summary.sh
# up to 4 steps, each can have 1 MiB output (for debugging log files)
- run: .github/workflows/scripts/generate-summary.sh 1
- run: .github/workflows/scripts/generate-summary.sh 2
- run: .github/workflows/scripts/generate-summary.sh 3
- run: .github/workflows/scripts/generate-summary.sh 4
- uses: actions/upload-artifact@v3
with:
name: Summary Files
path: Summary/
- uses: geekyeggo/delete-artifact@v2
with:
name: modules-20.04
- uses: geekyeggo/delete-artifact@v2
with:
name: modules-22.04