File: network-manager.yml

package info (click to toggle)
netplan.io 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,268 kB
  • sloc: python: 34,640; ansic: 14,096; xml: 4,989; javascript: 2,165; sh: 513; makefile: 118
file content (74 lines) | stat: -rw-r--r-- 3,443 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
name: NetworkManager Autopkgtest

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
  push:
    branches: [ main, 'stable/**' ]
    paths-ignore:
      - 'doc/**'
  pull_request:
    branches: [ '**' ]
    paths-ignore:
      - 'doc/**'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  lxd-network-manager:
    # The type of runner that the job will run on
    runs-on: ubuntu-24.04

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v3
      # Setup LXD + Docker fixes
      - uses: canonical/setup-lxd@v0.1.1
        with:
          channel: latest/stable  # switch from distro's LTS channel to latest/stable
      - run: |
          git fetch --unshallow --tags
      # Install openvswitch-switch to make the OVS integration tests work
      # Install linux-modules-extra-azure to provide the 'vrf' kernel module,
      # it's needed (will be auto-loaded) by routing.test_vrf_basic
      - name: Install dependencies
        run: |
          sudo add-apt-repository -y -n -s ppa:slyon/netplan-ci
          sudo apt update
          sudo apt install autopkgtest dnsmasq-base ubuntu-dev-tools devscripts openvswitch-switch linux-modules-extra-$(uname -r)
      - name: Prepare test
        run: |
          pull-lp-source netplan.io
          cp -r netplan.io-*/debian .
          rm -r debian/patches/  # clear any distro patches
          sed -i 's|systemd (>= 257.2-3ubuntu1~),|systemd (>= 248~),|g' debian/control  # see https://github.com/canonical/netplan/pull/535
          echo 'usr/libexec/netplan/configure' >> debian/netplan-generator.install
          echo 'usr/lib/systemd/system/netplan-configure.service' >> debian/netplan-generator.install
          sed -i 's|libexec/netplan/generate|libexec/netplan/configure|g' debian/netplan-generator.postinst
          echo "3.0 (native)" > debian/source/format  # force native build
          TAG=$(git describe --tags $(git rev-list --tags --max-count=1))  # find latest (stable) tag
          REV=$(git rev-parse --short HEAD)  # get current git revision
          VER="$TAG+git~$REV"
          dch -v "$VER" "Autopkgtest CI"
      # Build deb
      - uses: jtdor/build-deb-action@v1
        env:
          DEB_BUILD_OPTIONS: nocheck
          DPKG_GENSYMBOLS_CHECK_LEVEL: 0
        with:
          docker-image: ubuntu:noble
          buildpackage-opts: --build=binary --no-sign
          #extra-build-deps: python3-cffi libpython3-dev
      # work around LP: #1878225 as fallback
      - name: Preparing autopkgtest-build-lxd
        run: |
          sudo patch /usr/share/autopkgtest/lib/build-lxd.sh .github/workflows/snapd.patch
          MIRROR=http://archive.ubuntu.com/ubuntu autopkgtest-build-lxd ubuntu-daily:noble # LP: #2052639
      - name: Run autopkgtest
        run: |
          # When we introduce ABI breaking changes, we need to rebuild NM in DEP-8
          #pull-lp-source network-manager noble
          sudo autopkgtest -U \
            --env=DEB_BUILD_OPTIONS=nocheck \
            --apt-pocket=proposed=src:network-manager \
            debian/artifacts/*.deb network-manager -- lxd autopkgtest/ubuntu/noble/amd64 || test $? -eq 2  # allow for skipped tests (exit code = 2)