Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Verify

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
shell-and-layout:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install verification tools
run: |
sudo apt-get update
sudo apt-get install -y cpio curl rpm2cpio

- name: Check shell syntax
run: |
sh -n build-docaofed-provider-compat.sh
sh -n tests/check-upstream-doca-layout.sh
sh -n tests/check-upstream-doca-repositories.sh
sh -n tests/verify-doca-rpm-layout.sh
sh -n testing/libvirt/remote-doca-vm-test.sh

- name: Check DOCA latest repository index
run: VERIFY_NEW_REPOSITORIES=1 sh tests/check-upstream-doca-repositories.sh

- name: Verify public DOCA RPM layout
run: sh tests/verify-doca-rpm-layout.sh

- name: Check supported DOCA latest baseline
run: |
REPOSITORY_LABEL="DOCA latest" \
DOCA_REPO_ROOT="https://linux.mellanox.com/public/repo/doca/latest" \
EXPECTED_LAYOUT="tests/doca-latest-supported.tsv" \
sh tests/check-upstream-doca-layout.sh

- name: Check supported DOCA 3.2 LTS baseline
run: |
REPOSITORY_LABEL="DOCA 3.2 LTS" \
DOCA_REPO_ROOT="https://linux.mellanox.com/public/repo/doca/latest-3.2-LTS" \
EXPECTED_LAYOUT="tests/doca-3.2-lts-supported.tsv" \
sh tests/check-upstream-doca-layout.sh
157 changes: 139 additions & 18 deletions .github/workflows/watch-upstream.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Watch upstream MLNX OFED releases
name: Watch upstream DOCA OFED layout

on:
schedule:
Expand All @@ -10,25 +10,32 @@ permissions:
issues: write

jobs:
check-upstream:
check-repository-index:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Check NVIDIA upstream index
- name: Install verification tools
run: |
sudo apt-get update
sudo apt-get install -y cpio curl rpm2cpio

- name: Check NVIDIA DOCA latest repository index
env:
GH_TOKEN: ${{ github.token }}
ISSUE_TITLE: New MLNX_OFED upstream releases detected
ISSUE_TITLE: DOCA OFED latest repository index changed
ISSUE_LABEL: upstream-update
run: |
set -eu

missing_file="${RUNNER_TEMP}/missing-mlnxofed-releases.txt"
body_file="${RUNNER_TEMP}/mlnxofed-upstream-issue.md"
report_file="${RUNNER_TEMP}/doca-repository-index-report.txt"
body_file="${RUNNER_TEMP}/doca-repository-index-issue.md"

set +e
sh tests/check-upstream-releases.sh > "$missing_file"
VERIFY_NEW_REPOSITORIES=1 \
COMPATIBLE_ADDITIONS_EXIT_CODE=10 \
sh tests/check-upstream-doca-repositories.sh > "$report_file" 2>&1
status=$?
set -e

Expand All @@ -39,34 +46,148 @@ jobs:
--jq '.[0].number // empty')

if [ "$status" -eq 0 ]; then
cat "$missing_file"
cat "$report_file"
if [ -n "$existing_issue" ]; then
gh issue close "$existing_issue" \
--comment "No unsupported Enterprise Linux MLNX_OFED releases are currently detected."
--comment "The DOCA latest* repository index matches the known baseline again."
fi
exit 0
fi

if ! grep -E '^[0-9][0-9.]*-[0-9A-Za-z.-]+$' "$missing_file" >/dev/null; then
cat "$missing_file"
exit "$status"
if [ "$status" -eq 10 ]; then
cat "$report_file"
{
echo "NVIDIA published one or more new DOCA latest* repositories, and the repository layout verifier passed."
echo
echo '```text'
cat "$report_file"
echo '```'
echo
echo "Source index:"
echo "- https://linux.mellanox.com/public/repo/doca/"
echo
echo "The compatibility overlay preconditions still hold. Next step: run VM validation where hardware is available, then add a supported baseline if this release should be claimed as supported."
} > "$body_file"

gh label create "$ISSUE_LABEL" \
--color f29513 \
--description "Tracks upstream DOCA OFED layout changes" || true

if [ -n "$existing_issue" ]; then
gh issue edit "$existing_issue" --body-file "$body_file"
else
gh issue create \
--title "$ISSUE_TITLE" \
--body-file "$body_file" \
--label "$ISSUE_LABEL"
fi

exit 0
fi

{
echo "The NVIDIA upstream MLNX_OFED repository contains Enterprise Linux release directories that are not listed as supported here."
echo "The NVIDIA DOCA latest* repository index no longer matches the known baseline."
echo
echo "Missing releases:"
sed 's/^/- `/' "$missing_file" | sed 's/$/`/'
echo '```text'
cat "$report_file"
echo '```'
echo
echo "Source index:"
echo "https://linux.mellanox.com/public/repo/mlnx_ofed/"
echo "- https://linux.mellanox.com/public/repo/doca/"
echo
echo "Next step: inspect the new latest* repository, run layout verification, run VM validation where hardware is available, and decide whether to add it as a supported baseline."
} > "$body_file"

gh label create "$ISSUE_LABEL" \
--color f29513 \
--description "Tracks upstream DOCA OFED layout changes" || true

if [ -n "$existing_issue" ]; then
gh issue edit "$existing_issue" --body-file "$body_file"
else
gh issue create \
--title "$ISSUE_TITLE" \
--body-file "$body_file" \
--label "$ISSUE_LABEL"
fi

exit 1

check-upstream:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- label: DOCA latest
repo_root: https://linux.mellanox.com/public/repo/doca/latest
expected_layout: tests/doca-latest-supported.tsv
issue_title: New DOCA OFED latest layout detected
- label: DOCA 3.2 LTS
repo_root: https://linux.mellanox.com/public/repo/doca/latest-3.2-LTS
expected_layout: tests/doca-3.2-lts-supported.tsv
issue_title: New DOCA OFED 3.2 LTS layout detected
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install verification tools
run: |
sudo apt-get update
sudo apt-get install -y cpio curl rpm2cpio

- name: Check NVIDIA DOCA layout
env:
GH_TOKEN: ${{ github.token }}
DOCA_LABEL: ${{ matrix.label }}
DOCA_REPO_ROOT: ${{ matrix.repo_root }}
EXPECTED_LAYOUT: ${{ matrix.expected_layout }}
ISSUE_TITLE: ${{ matrix.issue_title }}
ISSUE_LABEL: upstream-update
run: |
set -eu

report_file="${RUNNER_TEMP}/doca-upstream-report.txt"
body_file="${RUNNER_TEMP}/doca-upstream-issue.md"

set +e
REPOSITORY_LABEL="$DOCA_LABEL" sh tests/check-upstream-doca-layout.sh > "$report_file" 2>&1
status=$?
set -e

existing_issue=$(gh issue list \
--state open \
--search "\"${ISSUE_TITLE}\" in:title" \
--json number \
--jq '.[0].number // empty')

if [ "$status" -eq 0 ]; then
cat "$report_file"
if [ -n "$existing_issue" ]; then
gh issue close "$existing_issue" \
--comment "The ${DOCA_LABEL} repository layout matches the supported baseline again."
fi
exit 0
fi

{
echo "The NVIDIA ${DOCA_LABEL} repository no longer matches the supported baseline."
echo
echo '```text'
cat "$report_file"
echo '```'
echo
echo "Source indexes:"
echo "- ${DOCA_REPO_ROOT}/rhel8/"
echo "- ${DOCA_REPO_ROOT}/rhel9/"
echo "- ${DOCA_REPO_ROOT}/rhel10/"
echo
echo "Next step: add metadata for the new RPM-backed release, run the release verifier, and close this issue after merging support."
echo "Next step: update the supported baseline, rerun the repository layout verifier, and rerun VM validation where hardware is available."
} > "$body_file"

gh label create "$ISSUE_LABEL" \
--color f29513 \
--description "Tracks upstream MLNX_OFED release changes" || true
--description "Tracks upstream DOCA OFED layout changes" || true

if [ -n "$existing_issue" ]; then
gh issue edit "$existing_issue" --body-file "$body_file"
Expand Down
Loading
Loading