-
Notifications
You must be signed in to change notification settings - Fork 17
87 lines (76 loc) · 2.78 KB
/
perform_build.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: (c) 2024 Advanced Micro Devices, Inc.
name: "perform_build"
on:
push:
pull_request:
types: [opened]
jobs:
extract_branch_info:
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
onloadPublicTreeish: ${{ steps.onloadPublicTreeish.outputs.tag }}
packetDrillBranch: ${{ steps.packetDrillBranch.outputs.branch }}
steps:
- name: tcpdirect
uses: actions/checkout@v4
with:
path: tcpdirect
- name: Install yq
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip jq
pip3 install yq
- name: Extract public onload tree-ish
id: onloadPublicTreeish
run: echo "tag=$(yq -r '.products.Onload.public_tree_ish' < $GITHUB_WORKSPACE/tcpdirect/versions.yaml)" >> "$GITHUB_OUTPUT"
- name: Extract packetDrill branch name
id: packetDrillBranch
run: echo "branch=$(yq -r '.products.Packetdrill.version' < $GITHUB_WORKSPACE/tcpdirect/versions.yaml)" >> "$GITHUB_OUTPUT"
perform_build_and_test:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: extract_branch_info
env:
TCPDIRECT_TREE: ${{ github.workspace }}/tcpdirect
ONLOAD_TREE: ${{ github.workspace }}/onload
steps:
- name: Checkout TCPDirect
uses: actions/checkout@v4
with:
path: ${{ env.TCPDIRECT_TREE }}
- name: Checkout Onload
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/onload
path: ${{ env.ONLOAD_TREE }}
ref: ${{ needs.extract_branch_info.outputs.onloadPublicTreeish }}
- name: Checkout packetdrill
uses: actions/checkout@v4
continue-on-error: true
with:
repository: ${{ github.repository_owner }}/packetdrill-tcpdirect
path: packetdrill-tcpdirect
ref: ${{ needs.extract_branch_info.outputs.packetDrillBranch }}
- name: Install the TCPDirect build and test dependencies
uses: ./tcpdirect/.github/actions/install-dependencies
- name: Build the base TCPDirect library
uses: ./tcpdirect/.github/actions/build
with:
tcpdirect_tree: ${{ env.TCPDIRECT_TREE }}
onload_tree: ${{ env.ONLOAD_TREE }}
build_target: all
debug: true
- name: Build the TCPDirect socket shim
uses: ./tcpdirect/.github/actions/build
with:
tcpdirect_tree: ${{ env.TCPDIRECT_TREE }}
onload_tree: ${{ env.ONLOAD_TREE }}
build_target: shim
debug: true
- name: Run the TCPDirect unit tests
uses: ./tcpdirect/.github/actions/test
with:
tcpdirect_tree: ${{ env.TCPDIRECT_TREE }}
onload_tree: ${{ env.ONLOAD_TREE }}