File: test-build.yml

package info (click to toggle)
grml-debootstrap 0.124
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 460 kB
  • sloc: sh: 2,525; python: 165; makefile: 70; ansic: 49
file content (102 lines) | stat: -rw-r--r-- 2,659 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: test-build
on:
  workflow_dispatch:
  pull_request:
  push:
  schedule:
    - cron: '30 3 * * 2'

concurrency:
  group: "${{ github.ref }}"
  cancel-in-progress: true
jobs:
  build-debian:
    strategy:
      # Keep other matrix jobs running, even if one fails.
      fail-fast: false
      matrix:
        host_release:
        - unstable
        - trixie
        - bookworm

    # We want a working shell, qemu, python and docker. Specific version should not matter (much).
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v6

    - run: ./tests/gha-build-deb.sh
      name: "Build .deb for ${{matrix.host_release}}"
      env:
        HOST_RELEASE: ${{matrix.host_release}}

    - name: Archive built .deb
      uses: actions/upload-artifact@v6
      with:
        name: deb-${{matrix.host_release}}
        if-no-files-found: error
        path: |
          *.deb

  test-debian:
    needs: build-debian
    strategy:
      # Keep other matrix jobs running, even if one fails.
      fail-fast: false
      matrix:
        host_release:
        - unstable
        - trixie
        - bookworm

        release:
        - trixie
        - bookworm

        runner:
        - ubuntu-latest
        - ubuntu-24.04-arm

    # We want a working shell, qemu, python and docker. Specific version should not matter (much).
    runs-on: ${{ matrix.runner }}

    steps:
    - uses: actions/checkout@v6

    - name: Download built deb
      uses: actions/download-artifact@v7
      with:
        name: deb-${{matrix.host_release}}

    - run: ./tests/build-vm-and-test.sh setup
      name: "Setup test environment"

    - run: ./tests/build-vm-and-test.sh run
      name: "Build VM image using grml-debootstrap on host ${{matrix.host_release}} for ${{matrix.release}}"
      env:
        HOST_RELEASE: ${{matrix.host_release}}
        RELEASE: ${{matrix.release}}

    - run: ./tests/build-vm-and-test.sh test
      id: build_vm_and_test_test
      name: "Test built VM image for ${{matrix.release}}"
      env:
        RELEASE: ${{matrix.release}}

    - name: Archive VM image on failure
      uses: actions/upload-artifact@v6
      if: always() && (steps.build_vm_and_test_test.outcome == 'failure')
      with:
        name: vm-image-${{matrix.host_release}}-${{matrix.release}}-${{matrix.runner}}
        if-no-files-found: error
        path: qemu.img
        retention-days: 5

    - name: Archive VM test results
      uses: actions/upload-artifact@v6
      if: always()
      with:
        name: vm-results-${{matrix.host_release}}-${{matrix.release}}-${{matrix.runner}}
        if-no-files-found: error
        path: tests/results/