mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-08-24 19:24:14 +02:00
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/cache](https://github.com/actions/cache). Updates `actions/checkout` from 6.0.3 to 7.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](df4cb1c069...9c091bb21b) Updates `actions/cache` from 5.0.5 to 6.0.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](27d5ce7f10...2c8a9bd745) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/cache dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
362 lines
13 KiB
YAML
362 lines
13 KiB
YAML
# Copyright 2024-2026 Rainer Gerhards and Others
|
|
#
|
|
# https://github.com/rsyslog/rsyslog
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
---
|
|
name: debian experimental package build
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '17 2 * * 0'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: >-
|
|
${{ github.workflow }}-${{
|
|
github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
DEBIAN_CI_POLICY_FILE: .github/debian-ci-policy.yml
|
|
DEBIAN_CI_HELPER: .github/scripts/debian_package_build.sh
|
|
DEBIAN_PACKAGING_REPO: https://salsa.debian.org/debian/rsyslog.git
|
|
DEBIAN_PACKAGING_BRANCH: debian/latest
|
|
|
|
jobs:
|
|
debian_package_changes:
|
|
name: debian package change detection
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
any_changed: >-
|
|
${{
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'schedule' ||
|
|
steps.debian_package_changes.outputs.any_changed == 'true'
|
|
}}
|
|
steps:
|
|
- name: Checkout rsyslog source
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Fetch upstream base for changed-files diff
|
|
if: github.event_name == 'pull_request'
|
|
env:
|
|
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
run: |
|
|
git remote add upstream https://github.com/${{ github.repository }}.git
|
|
git fetch upstream "$BASE_REF"
|
|
|
|
- name: Check for Debian package relevant changes
|
|
id: debian_package_changes
|
|
if: github.event_name == 'pull_request'
|
|
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
|
with:
|
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
|
sha: ${{ github.event.pull_request.head.sha }}
|
|
files: |
|
|
**/*.c
|
|
**/*.h
|
|
**/*.l
|
|
**/*.m4
|
|
**/*.py
|
|
**/*.rst
|
|
**/*.sh
|
|
**/*.y
|
|
**/Makefile.am
|
|
.github/debian-ci-policy.yml
|
|
.github/scripts/debian_package_build.sh
|
|
.github/workflows/debian_package_build.yml
|
|
ChangeLog
|
|
CONTRIBUTING.md
|
|
COPYING
|
|
COPYING.*
|
|
NEWS
|
|
README
|
|
README.*
|
|
autogen.sh
|
|
build-aux/**
|
|
compat/**
|
|
configure.ac
|
|
contrib/**
|
|
diag.sh
|
|
doc/**
|
|
grammar/**
|
|
m4/**
|
|
packaging/**
|
|
platform/**
|
|
plugins/**
|
|
runtime/**
|
|
tests/**
|
|
tools/**
|
|
|
|
debian_experimental_gate:
|
|
name: debian experimental gate
|
|
needs: debian_package_changes
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 75
|
|
container:
|
|
image: debian:trixie
|
|
options: --user root
|
|
|
|
steps:
|
|
- name: Checkout rsyslog source
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Skip Debian package gate, no relevant changes
|
|
if: needs.debian_package_changes.outputs.any_changed != 'true'
|
|
run: echo "No Debian package relevant changes detected; skipping package gate."
|
|
|
|
- name: Install prerequisites
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" install_prereqs
|
|
|
|
- name: Load Debian CI policy
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" load_policy \
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_POLICY_FILE" \
|
|
/tmp/debian-ci-policy
|
|
|
|
- name: Fetch official Debian experimental baseline
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" fetch_debian_packaging \
|
|
"$DEBIAN_PACKAGING_REPO" \
|
|
"$DEBIAN_PACKAGING_BRANCH" \
|
|
/tmp/debian-packaging
|
|
|
|
- name: Install Debian build dependencies
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" install_build_deps \
|
|
/tmp/debian-packaging/control \
|
|
/tmp/debian-ci-policy/supplemental_build_deps.txt
|
|
|
|
- name: Generate rsyslog dist tarball
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" run_dist_build \
|
|
"$GITHUB_WORKSPACE"
|
|
|
|
- name: Locate rsyslog dist tarball
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
dist_tarball="$(
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" find_dist_tarball \
|
|
"$GITHUB_WORKSPACE"
|
|
)"
|
|
echo "DIST_TARBALL=$dist_tarball" >> "$GITHUB_ENV"
|
|
|
|
- name: Unpack tarball and inject Debian packaging
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" unpack_source_tree \
|
|
"$GITHUB_WORKSPACE" \
|
|
"$DIST_TARBALL" \
|
|
/tmp/debian-packaging \
|
|
/tmp/debian-src
|
|
|
|
- name: Apply Debian CI policy
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" apply_not_installed_policy \
|
|
/tmp/debian-src \
|
|
/tmp/debian-ci-policy/not_installed_paths.txt \
|
|
/tmp/debian-ci-policy/not_installed_paths.reasons.txt
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" resolve_patch_policy \
|
|
/tmp/debian-src \
|
|
/tmp/debian-ci-policy/allowed_patch_skips.txt \
|
|
/tmp/debian-ci-policy/allowed_patch_skips.reasons.txt \
|
|
strict
|
|
|
|
- name: Build Debian packages including docs
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" build_package \
|
|
/tmp/debian-src
|
|
|
|
debian_experimental_diagnostics:
|
|
name: debian experimental diagnostics
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 90
|
|
needs:
|
|
- debian_package_changes
|
|
- debian_experimental_gate
|
|
if: always()
|
|
container:
|
|
image: debian:trixie
|
|
options: --user root
|
|
|
|
steps:
|
|
- name: Checkout rsyslog source
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Skip Debian package diagnostics, no relevant changes
|
|
if: needs.debian_package_changes.outputs.any_changed != 'true'
|
|
run: echo "No Debian package relevant changes detected; skipping package diagnostics."
|
|
|
|
- name: Install prerequisites
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" install_prereqs
|
|
|
|
- name: Load Debian CI policy
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" load_policy \
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_POLICY_FILE" \
|
|
/tmp/debian-ci-policy
|
|
|
|
- name: Initialize findings
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" init_findings_dir \
|
|
/tmp/debian-ci-findings.d
|
|
|
|
- name: Fetch official Debian experimental baseline
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" fetch_debian_packaging \
|
|
"$DEBIAN_PACKAGING_REPO" \
|
|
"$DEBIAN_PACKAGING_BRANCH" \
|
|
/tmp/debian-packaging
|
|
|
|
- name: Install Debian build dependencies
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
set +e
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" install_build_deps \
|
|
/tmp/debian-packaging/control \
|
|
/tmp/debian-ci-policy/supplemental_build_deps.txt \
|
|
/tmp/debian-ci-findings.d
|
|
rc=$?
|
|
set -e
|
|
if [ "$rc" -ne 0 ]; then
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" append_finding \
|
|
/tmp/debian-ci-findings.d \
|
|
blocking_gate_failures \
|
|
"- Failed to install Debian build dependencies under the current policy."
|
|
fi
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" record_policy_items \
|
|
/tmp/debian-ci-policy/supplemental_build_deps.reasons.txt \
|
|
/tmp/debian-ci-findings.d \
|
|
allowed_dependency_drift \
|
|
"Update Debian build dependencies for"
|
|
echo "DIAG_DEP_RC=$rc" >> "$GITHUB_ENV"
|
|
|
|
- name: Generate rsyslog dist tarball
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" run_dist_build \
|
|
"$GITHUB_WORKSPACE"
|
|
|
|
- name: Locate rsyslog dist tarball
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
dist_tarball="$(
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" find_dist_tarball \
|
|
"$GITHUB_WORKSPACE"
|
|
)"
|
|
echo "DIST_TARBALL=$dist_tarball" >> "$GITHUB_ENV"
|
|
|
|
- name: Unpack tarball and inject Debian packaging
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" unpack_source_tree \
|
|
"$GITHUB_WORKSPACE" \
|
|
"$DIST_TARBALL" \
|
|
/tmp/debian-packaging \
|
|
/tmp/debian-src
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" apply_not_installed_policy \
|
|
/tmp/debian-src \
|
|
/tmp/debian-ci-policy/not_installed_paths.txt \
|
|
/tmp/debian-ci-policy/not_installed_paths.reasons.txt \
|
|
/tmp/debian-ci-findings.d
|
|
|
|
- name: Resolve Debian patch policy
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" resolve_patch_policy \
|
|
/tmp/debian-src \
|
|
/tmp/debian-ci-policy/allowed_patch_skips.txt \
|
|
/tmp/debian-ci-policy/allowed_patch_skips.reasons.txt \
|
|
diagnostics \
|
|
/tmp/debian-ci-findings.d
|
|
|
|
- name: Build Debian packages under policy
|
|
if: needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
if [ "${DIAG_DEP_RC:-1}" -ne 0 ]; then
|
|
echo "Skipping build because dependency setup already failed."
|
|
exit 0
|
|
fi
|
|
set +e
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" build_package \
|
|
/tmp/debian-src > /tmp/debian-build.log 2>&1
|
|
rc=$?
|
|
set -e
|
|
cat /tmp/debian-build.log
|
|
if ! "$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" check_docs_build_log /tmp/debian-build.log; then
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" append_finding \
|
|
/tmp/debian-ci-findings.d \
|
|
docs_test_observations \
|
|
"- Debian docs build emitted fatal Sphinx/docutils diagnostics even though Debian's default command did not stop immediately."
|
|
fi
|
|
if [ "$rc" -ne 0 ]; then
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" append_finding \
|
|
/tmp/debian-ci-findings.d \
|
|
blocking_gate_failures \
|
|
"- \`dpkg-buildpackage -b -uc -us\` failed after applying the allowed Debian CI policy."
|
|
fi
|
|
if grep -Fq 'dh_sphinxdoc: warning:' /tmp/debian-build.log; then
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" append_finding \
|
|
/tmp/debian-ci-findings.d \
|
|
docs_test_observations \
|
|
"- Debian docs packaging emitted \`dh_sphinxdoc\` warnings for vendored JavaScript assets; build still succeeded."
|
|
fi
|
|
echo "DIAG_BUILD_RC=$rc" >> "$GITHUB_ENV"
|
|
|
|
- name: Publish diagnostics findings
|
|
id: findings
|
|
if: >-
|
|
always() &&
|
|
needs.debian_package_changes.outputs.any_changed == 'true'
|
|
run: |
|
|
"$GITHUB_WORKSPACE/$DEBIAN_CI_HELPER" render_findings \
|
|
/tmp/debian-ci-findings.d \
|
|
/tmp/debian-ci-findings.md \
|
|
"${{ needs.debian_experimental_gate.result }}" \
|
|
"Debian experimental diagnostics findings"
|
|
{
|
|
echo "### Debian experimental diagnostics findings"
|
|
echo
|
|
cat /tmp/debian-ci-findings.md
|
|
} >> "$GITHUB_STEP_SUMMARY"
|