4295f9
From b3c617b8d0fb95322e203842d2ac68593a4acdcd Mon Sep 17 00:00:00 2001
4295f9
From: Frantisek Sumsal <frantisek@sumsal.cz>
4295f9
Date: Sun, 18 Apr 2021 20:46:06 +0200
4295f9
Subject: [PATCH] ci: drop CIs irrelevant for downstream
4295f9
4295f9
  * CIFuzz would need a separate project in oss-fuzz
4295f9
  * Coverity would also need a separate project
4295f9
  * the Labeler action is superfluous, since we already have a bot for
4295f9
    that
4295f9
  * mkosi testing on other distros is irrelevant for downstream RHEL
4295f9
    repo
4295f9
4295f9
Resolves: #1960703
4295f9
rhel-only
4295f9
---
4295f9
 .github/labeler.yml                  | 38 ------------------
4295f9
 .github/workflows/cifuzz.yml         | 47 ----------------------
4295f9
 .github/workflows/coverity.yml       | 39 -------------------
4295f9
 .github/workflows/labeler.yml        | 13 -------
4295f9
 .github/workflows/mkosi.yml          | 58 ----------------------------
4295f9
 .github/workflows/test_mkosi_boot.py | 24 ------------
4295f9
 6 files changed, 219 deletions(-)
4295f9
 delete mode 100644 .github/labeler.yml
4295f9
 delete mode 100644 .github/workflows/cifuzz.yml
4295f9
 delete mode 100644 .github/workflows/coverity.yml
4295f9
 delete mode 100644 .github/workflows/labeler.yml
4295f9
 delete mode 100644 .github/workflows/mkosi.yml
4295f9
 delete mode 100755 .github/workflows/test_mkosi_boot.py
4295f9
4295f9
diff --git a/.github/labeler.yml b/.github/labeler.yml
4295f9
deleted file mode 100644
4295f9
index 773d575004..0000000000
4295f9
--- a/.github/labeler.yml
4295f9
+++ /dev/null
4295f9
@@ -1,38 +0,0 @@
4295f9
-hwdb:
4295f9
-  - hwdb.d/**/*
4295f9
-units:
4295f9
-  - units/**/*
4295f9
-documentation:
4295f9
-  - NEWS
4295f9
-  - docs/*
4295f9
-network:
4295f9
-  - src/libsystemd-network/**/*
4295f9
-  - src/network/**/*
4295f9
-udev:
4295f9
-  - src/udev/**/*
4295f9
-  - src/libudev/*
4295f9
-selinux:
4295f9
-  - '**/*selinux*'
4295f9
-apparmor:
4295f9
-  - '**/*apparmor*'
4295f9
-meson:
4295f9
-  - meson_option.txt
4295f9
-mkosi:
4295f9
-  - .mkosi/*
4295f9
-  - mkosi.build
4295f9
-busctl:
4295f9
-  - src/busctl/*
4295f9
-systemctl:
4295f9
-  - src/systemctl/*
4295f9
-journal:
4295f9
-  - src/journal/*
4295f9
-journal-remote:
4295f9
-  - src/journal-remote/*
4295f9
-portable:
4295f9
-  - src/portable/**/*
4295f9
-resolve:
4295f9
-  - src/resolve/*
4295f9
-timedate:
4295f9
-  - src/timedate/*
4295f9
-timesync:
4295f9
-  - src/timesync/*
4295f9
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
4295f9
deleted file mode 100644
4295f9
index 14d81a67ff..0000000000
4295f9
--- a/.github/workflows/cifuzz.yml
4295f9
+++ /dev/null
4295f9
@@ -1,47 +0,0 @@
4295f9
----
4295f9
-# vi: ts=2 sw=2 et:
4295f9
-# See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/
4295f9
-
4295f9
-name: CIFuzz
4295f9
-on:
4295f9
-  pull_request:
4295f9
-    paths:
4295f9
-      - '**/meson.build'
4295f9
-      - '.github/workflows/**'
4295f9
-      - 'meson_options.txt'
4295f9
-      - 'src/**'
4295f9
-      - 'test/fuzz/**'
4295f9
-      - 'tools/oss-fuzz.sh'
4295f9
-  push:
4295f9
-    branches:
4295f9
-      - main
4295f9
-jobs:
4295f9
- Fuzzing:
4295f9
-   runs-on: ubuntu-latest
4295f9
-   if: github.repository == 'systemd/systemd'
4295f9
-   strategy:
4295f9
-     fail-fast: false
4295f9
-     matrix:
4295f9
-       sanitizer: [address, undefined, memory]
4295f9
-   steps:
4295f9
-   - name: Build Fuzzers (${{ matrix.sanitizer }})
4295f9
-     id: build
4295f9
-     uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
4295f9
-     with:
4295f9
-       oss-fuzz-project-name: 'systemd'
4295f9
-       dry-run: false
4295f9
-       allowed-broken-targets-percentage: 0
4295f9
-       sanitizer: ${{ matrix.sanitizer }}
4295f9
-   - name: Run Fuzzers (${{ matrix.sanitizer }})
4295f9
-     uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
4295f9
-     with:
4295f9
-       oss-fuzz-project-name: 'systemd'
4295f9
-       fuzz-seconds: 600
4295f9
-       dry-run: false
4295f9
-       sanitizer: ${{ matrix.sanitizer }}
4295f9
-   - name: Upload Crash
4295f9
-     uses: actions/upload-artifact@v1
4295f9
-     if: failure() && steps.build.outcome == 'success'
4295f9
-     with:
4295f9
-       name: ${{ matrix.sanitizer }}-artifacts
4295f9
-       path: ./out/artifacts
4295f9
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
4295f9
deleted file mode 100644
4295f9
index a0eb0f01fd..0000000000
4295f9
--- a/.github/workflows/coverity.yml
4295f9
+++ /dev/null
4295f9
@@ -1,39 +0,0 @@
4295f9
----
4295f9
-# vi: ts=2 sw=2 et:
4295f9
-#
4295f9
-name: Coverity
4295f9
-
4295f9
-on:
4295f9
-  schedule:
4295f9
-    # Run Coverity daily at midnight
4295f9
-    - cron:  '0 0 * * *'
4295f9
-
4295f9
-jobs:
4295f9
-  build:
4295f9
-    runs-on: ubuntu-20.04
4295f9
-    if: github.repository == 'systemd/systemd'
4295f9
-    env:
4295f9
-      COVERITY_SCAN_BRANCH_PATTERN:     "${{ github.ref}}"
4295f9
-      COVERITY_SCAN_NOTIFICATION_EMAIL: ""
4295f9
-      COVERITY_SCAN_PROJECT_NAME:       "${{ github.repository }}"
4295f9
-      # Set in repo settings -> secrets -> repository secrets
4295f9
-      COVERITY_SCAN_TOKEN:              "${{ secrets.COVERITY_SCAN_TOKEN }}"
4295f9
-      CURRENT_REF:                      "${{ github.ref }}"
4295f9
-    steps:
4295f9
-      - name: Repository checkout
4295f9
-        uses: actions/checkout@v1
4295f9
-      # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
4295f9
-      - name: Set the $COVERITY_SCAN_NOTIFICATION_EMAIL env variable
4295f9
-        run: echo "COVERITY_SCAN_NOTIFICATION_EMAIL=$(git log -1 ${{ github.sha }} --pretty=\"%aE\")" >> $GITHUB_ENV
4295f9
-      - name: Install Coverity tools
4295f9
-        run: tools/get-coverity.sh
4295f9
-      # Reuse the setup phase of the unit test script to avoid code duplication
4295f9
-      - name: Install build dependencies
4295f9
-        run: sudo -E .github/workflows/unit_tests.sh SETUP
4295f9
-      # Preconfigure with meson to prevent Coverity from capturing meson metadata
4295f9
-      - name: Preconfigure the build directory
4295f9
-        run: meson cov-build -Dman=false
4295f9
-      - name: Build
4295f9
-        run: tools/coverity.sh build
4295f9
-      - name: Upload the results
4295f9
-        run: tools/coverity.sh upload
4295f9
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
4295f9
deleted file mode 100644
4295f9
index 76d67a3a5c..0000000000
4295f9
--- a/.github/workflows/labeler.yml
4295f9
+++ /dev/null
4295f9
@@ -1,13 +0,0 @@
4295f9
-name: "Pull Request Labeler"
4295f9
-on:
4295f9
-- pull_request_target
4295f9
-
4295f9
-jobs:
4295f9
-  triage:
4295f9
-    runs-on: ubuntu-latest
4295f9
-    steps:
4295f9
-    - uses: actions/labeler@main
4295f9
-      with:
4295f9
-        repo-token: "${{ secrets.GITHUB_TOKEN }}"
4295f9
-        configuration-path: .github/labeler.yml
4295f9
-        sync-labels: "" # This is a workaround for issue 18671
4295f9
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml
4295f9
deleted file mode 100644
4295f9
index babdf7ae6e..0000000000
4295f9
--- a/.github/workflows/mkosi.yml
4295f9
+++ /dev/null
4295f9
@@ -1,58 +0,0 @@
4295f9
-name: mkosi
4295f9
-
4295f9
-# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in .mkosi.
4295f9
-
4295f9
-on:
4295f9
-  push:
4295f9
-    branches:
4295f9
-      - main
4295f9
-  pull_request:
4295f9
-    branches:
4295f9
-      - main
4295f9
-
4295f9
-jobs:
4295f9
-  ci:
4295f9
-    runs-on: ubuntu-20.04
4295f9
-    strategy:
4295f9
-      fail-fast: false
4295f9
-      matrix:
4295f9
-        distro:
4295f9
-          - arch
4295f9
-          - debian
4295f9
-          - ubuntu
4295f9
-          - fedora
4295f9
-
4295f9
-    steps:
4295f9
-    - uses: actions/checkout@v2
4295f9
-    - uses: systemd/mkosi@v9
4295f9
-
4295f9
-    - name: Install
4295f9
-      run: sudo apt-get update && sudo apt-get install --no-install-recommends python3-pexpect python3-jinja2
4295f9
-
4295f9
-    - name: Symlink
4295f9
-      run: ln -s .mkosi/mkosi.${{ matrix.distro }} mkosi.default
4295f9
-
4295f9
-    # Ubuntu's systemd-nspawn doesn't support faccessat2() syscall, which is
4295f9
-    # required, since current Arch's glibc implements faccessat() via faccessat2().
4295f9
-    - name: Update systemd-nspawn
4295f9
-      if: ${{ matrix.distro == 'arch' }}
4295f9
-      run: |
4295f9
-        echo "deb-src http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
4295f9
-        sudo apt update
4295f9
-        sudo apt build-dep systemd
4295f9
-        meson build
4295f9
-        ninja -C build
4295f9
-        sudo ln -svf $PWD/build/systemd-nspawn `which systemd-nspawn`
4295f9
-        systemd-nspawn --version
4295f9
-
4295f9
-    - name: Build ${{ matrix.distro }}
4295f9
-      run: sudo python3 -m mkosi --password= --qemu-headless build
4295f9
-
4295f9
-    - name: Show ${{ matrix.distro }} image summary
4295f9
-      run: sudo python3 -m mkosi --password= --qemu-headless summary
4295f9
-
4295f9
-    - name: Boot ${{ matrix.distro }} systemd-nspawn
4295f9
-      run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless boot
4295f9
-
4295f9
-    - name: Boot ${{ matrix.distro }} QEMU
4295f9
-      run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless qemu
4295f9
diff --git a/.github/workflows/test_mkosi_boot.py b/.github/workflows/test_mkosi_boot.py
4295f9
deleted file mode 100755
4295f9
index 3418fd3a51..0000000000
4295f9
--- a/.github/workflows/test_mkosi_boot.py
4295f9
+++ /dev/null
4295f9
@@ -1,24 +0,0 @@
4295f9
-#!/usr/bin/env python3
4295f9
-# SPDX-License-Identifier: LGPL-2.1-or-later
4295f9
-
4295f9
-import pexpect
4295f9
-import sys
4295f9
-
4295f9
-
4295f9
-def run() -> None:
4295f9
-    p = pexpect.spawnu(" ".join(sys.argv[1:]), logfile=sys.stdout, timeout=300)
4295f9
-
4295f9
-    p.expect("#")
4295f9
-    p.sendline("systemctl poweroff")
4295f9
-
4295f9
-    p.expect(pexpect.EOF)
4295f9
-
4295f9
-
4295f9
-try:
4295f9
-    run()
4295f9
-except pexpect.EOF:
4295f9
-    print("UNEXPECTED EOF")
4295f9
-    sys.exit(1)
4295f9
-except pexpect.TIMEOUT:
4295f9
-    print("TIMED OUT")
4295f9
-    sys.exit(1)