Skip to content

Commit

Permalink
ON-16261: simplify repo version information to key-value pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeather-amd committed Jan 10, 2025
1 parent 4aa9c46 commit 7943c67
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 47 deletions.
48 changes: 13 additions & 35 deletions .github/workflows/compatibility_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,24 @@ jobs:
make ONLOAD_TREE=$GITHUB_WORKSPACE/onload_internal -j $(nproc)
extract_branch_info:
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
onloadBranch: ${{ steps.onloadBranch.outputs.branch }}
tcpdirectBranch: ${{ steps.tcpdirectBranch.outputs.branch }}
steps:
- name: Checkout onload
uses: actions/checkout@v4
with:
path: onload

- name: Install yq
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip jq
pip3 install yq
- name: Extract onload branch
id: onloadBranch
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"

- name: Extract TCPDirect branch
id: tcpdirectBranch
run: echo "branch=$(yq -r '.products.TCPDirect.version' < $GITHUB_WORKSPACE/onload/versions.yaml)" >> "$GITHUB_OUTPUT"


tcpdirect:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: extract_branch_info
env:
TCPDIRECT_TREE: ${{ github.workspace }}/tcpdirect
ONLOAD_TREE: ${{ github.workspace }}/onload
steps:
- name: Checkout Onload
uses: actions/checkout@v4
with:
path: ${{ env.ONLOAD_TREE }}

- name: Extract version information
working-directory: ${{ env.ONLOAD_TREE }}
run: |
cat versions.env | sed -E "s/^#.*$//g" >> "$GITHUB_ENV"
echo "ONLOAD_DEV_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_ENV"
# We try checking out TCPDirect with the current onload branch to support
# development workflows, but will fall back to the branch defined in our
# versions.yaml file.
Expand All @@ -79,7 +62,7 @@ jobs:
with:
repository: ${{ github.repository_owner }}/tcpdirect
path: ${{ env.TCPDIRECT_TREE }}
ref: ${{ needs.extract_branch_info.outputs.onloadBranch }}
ref: ${{ env.ONLOAD_DEV_BRANCH }}

- name: Cleanup failed TCPDirect development branch checkout
if: ${{ ! cancelled() && steps.primary_tcpdirect_checkout.outcome == 'failure' }}
Expand All @@ -91,12 +74,7 @@ jobs:
with:
repository: ${{ github.repository_owner }}/tcpdirect
path: tcpdirect
ref: ${{ needs.extract_branch_info.outputs.tcpdirectBranch }}

- name: Checkout Onload
uses: actions/checkout@v4
with:
path: ${{ env.ONLOAD_TREE }}
ref: ${{ env.TCPDIRECT_VERSION }}

- name: Checkout packetdrill
uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
# X-SPDX-Copyright-Text: (c) Copyright 2018-2025 Advanced Micro Devices, Inc.

ONLOAD_VERSION=8.1.5
SIMPLE_SOCKET_APPS_VERSION=last_known_good/onload-8.1
TCPDIRECT_VERSION=v8_1
12 changes: 0 additions & 12 deletions versions.yaml

This file was deleted.

0 comments on commit 7943c67

Please sign in to comment.