-
Notifications
You must be signed in to change notification settings - Fork 124
76 lines (69 loc) · 2.27 KB
/
ci-pipeline.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
name: CI
on: [push, pull_request]
env:
ARCH: x86_64
CC: gcc
CONTAINER_NAMESPACE: ghcr.io/opendataplane/odp-docker-images
OS: ubuntu_20.04
jobs:
Checkpatch:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
sudo apt install codespell
- name: Check pull request
if: github.event_name == 'pull_request'
env:
CHECKPATCH_COMMAND: ./scripts/checkpatch.pl
uses: webispy/checkpatch-action@v7
- name: Check push
if: github.event_name == 'push' && github.ref != 'refs/heads/master'
run: |
AFTER=${{ github.event.after }}
BEFORE=${{ github.event.before }}
if [ -z "${BEFORE//0}" ] || [ -z "${AFTER//0}" ]; then
COMMIT_RANGE=""
else
COMMIT_RANGE="${BEFORE}..${AFTER}"
fi
./scripts/ci-checkpatches.sh ${COMMIT_RANGE}
Run_x86:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install automake autoconf libconfig-dev libcunit1-dev libssl-dev libtool pkg-config
- name: Run
run: |
less ./scripts/check.sh
ls -la ./scripts/check.sh
CC="${{matrix.cc}}" ./scripts/check.sh
- name: Failure log
if: ${{ failure() }}
run: find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done
Run_dpdk:
runs-on: ubuntu-20.04
env:
OS: ubuntu_20.04
strategy:
fail-fast: false
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v2
- run: sudo docker run -i -v `pwd`:/ofp --privileged --shm-size 8g -e CC="${{matrix.cc}}" -e ARCH="${ARCH}"
-e CXX=g++-10 $CONTAINER_NAMESPACE/odp-ci-${OS}-${ARCH}-dpdk_22.11 /bin/bash -c "apt-get -y update && apt -y install g++-10 && /ofp/scripts/check-dpdk.sh"
- name: Failure log
if: ${{ failure() }}
run: find . -name "*.trs" | xargs grep -l '^.test-result. FAIL' | while read trs ; do echo FAILURE detected at $trs; cat ${trs%%.trs}.log ; done