-
Notifications
You must be signed in to change notification settings - Fork 17
89 lines (73 loc) · 2.84 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
88
89
# SPDX-License-Identifier: BSD-2-Clause
# X-SPDX-Copyright-Text: (c) Copyright 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:
tcpdirectBranch: ${{ steps.tcpdirectBranch.outputs.branch }}
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 TCPDirect branch name
id: tcpdirectBranch
run: echo "branch=$(yq -r '.products.TCPDirect.version' < $GITHUB_WORKSPACE/tcpdirect/versions.yaml)" >> "$GITHUB_OUTPUT"
- 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
steps:
- name: tcpdirect
uses: actions/checkout@v4
with:
path: tcpdirect
- name: onload checkout public tree-ish
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/onload
path: onload
ref: ${{ needs.extract_branch_info.outputs.onloadPublicTreeish }}
- name: packetdrill checkout
uses: actions/checkout@v4
continue-on-error: true
with:
repository: ${{ github.repository_owner }}/packetdrill-tcpdirect
path: packetdrill-tcpdirect
ssh-key: ${{ secrets.PACKET_DRILL_PRIVATE_KEY }}
ref: ${{ needs.extract_branch_info.outputs.packetDrillBranch }}
- name: Install TCPDirect Deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential perl
- name: build
run: |
cd $GITHUB_WORKSPACE/tcpdirect
ONLOAD_TREE=$GITHUB_WORKSPACE/onload NDEBUG=1 make -j $(nproc)
- name: shim
run: |
cd $GITHUB_WORKSPACE/tcpdirect
ONLOAD_TREE=$GITHUB_WORKSPACE/onload NDEBUG=1 ZF_DEVEL=1 TEST_THREAD_NAME=zf make -j $(nproc) shim
- name: tests
run: |
cd $GITHUB_WORKSPACE/tcpdirect
ONLOAD_TREE=$GITHUB_WORKSPACE/onload UT_OUTPUT=$GITHUB_STEP_SUMMARY NDEBUG=1 ZF_DEVEL=1 TEST_THREAD_NAME=zf make -j $(nproc) -k test