-
Notifications
You must be signed in to change notification settings - Fork 26
126 lines (126 loc) · 4.18 KB
/
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
name: build
'on':
push:
pull_request:
permissions: {}
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
with:
node-version: 20
- id: deps
name: Install dependencies
run: |
docs/ndndpdk-depends.sh -y --node=0 --go=0 --dpdk=0 --spdk=0
echo meson=$(meson --version) >> $GITHUB_OUTPUT
sudo update-alternatives --install /usr/bin/go go $(command -v go) 1
- name: Cache DPDK and SPDK
uses: actions/cache@v4
with:
path: ~/setup-dpdk
key: ${{ steps.deps.outputs.meson }}_20240613
- uses: yoursunny/setup-dpdk@main
with:
dpdk-version: v24.03
spdk-version: v24.05
- name: Build NDN-DPDK in debug mode
run: |
corepack pnpm install
make
sudo make install
for D in sample/activate sample/benchmark sample/status; do
pushd $D
corepack pnpm install
popd
done
sudo make uninstall
env:
NDNDPDK_MK_THREADSLEEP: 1
- name: Run required unit tests
run: |
echo 'bdev|disk|ethface|fetch|fileserver|fwdp|memifface|memiftransport|tgconsumer|tgproducer' >~/acceptable-failures.txt
MK_GOTEST_FILTER="/$(cat ~/acceptable-failures.txt)/ d" make test
env:
NDNDPDK_MK_THREADSLEEP: 1
- name: Run optional unit tests
run: |
MK_GOTEST_FILTER="/$(cat ~/acceptable-failures.txt)/! d" make test
env:
NDNDPDK_MK_THREADSLEEP: 1
continue-on-error: true
- name: Check code style
run: |
make lint
git diff --exit-code
- name: Build docs
run: make doxygen
- name: Build docs site
run: mk/netlify.sh
if: ${{ github.repository == 'yoursunny/ndn-dpdk' && github.event_name == 'push' }}
- name: Deploy docs site
uses: nwtgck/actions-netlify@v3
with:
publish-dir: ./build/netlify/
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.sha }} ${{ github.run_id }}
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: a0fbfa66-eecb-46d0-9e0b-093ddd1d0fad
if: ${{ github.repository == 'yoursunny/ndn-dpdk' && github.event_name == 'push' }}
docker:
runs-on: ubuntu-22.04
steps:
- uses: docker/build-push-action@v5
with:
tags: localhost/ndn-dpdk
build-args: |
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
DEPENDS_ARGS='-Ddisable_drivers=common/cnxk,common/dpaax,net/bnxt'
MAKE_ENV=NDNDPDK_MK_RELEASE=1
- name: Show image size
run: docker image inspect -f '{{.Size}}' localhost/ndn-dpdk
- name: List files in image
run: docker run --rm localhost/ndn-dpdk find /usr/local
library:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install TinyGo
run: |
wget -nv https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/tinygo_${TINYGO_VERSION}_amd64.deb
sudo dpkg -i tinygo_${TINYGO_VERSION}_amd64.deb
working-directory: /tmp
env:
TINYGO_VERSION: "0.32.0"
- name: Build for Linux without cgo
run: |
go build -v -o /dev/null ./ndn/...
go build -v -o /dev/null ./cmd/ndndpdk-ctrl
go build -v -o /dev/null ./cmd/ndndpdk-godemo
env:
CGO_ENABLED: 0
- name: Build for Windows without cgo
run: |
go build -v -o /dev/null ./ndn/...
env:
CGO_ENABLED: 0
GOOS: windows
- name: Build with TinyGo
run: |
tinygo build -o /dev/null -target=wasm ./ndn/ndntestenv/tiny
make -C sample/wasm