-
Notifications
You must be signed in to change notification settings - Fork 13
89 lines (83 loc) · 2.44 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
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on: [push, pull_request, workflow_dispatch]
env:
CC: gcc
# Default target architecture for native compilation
TARGET_ARCH: ""
jobs:
# Perform lint check on shell scripts and YAML files
Lint-Code-Base:
runs-on: ubuntu-latest
steps:
- name: Checkout EM-ODP
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files
# within `super-linter`
fetch-depth: 0
- name: Lint check
uses: github/super-linter@v4
env:
DEFAULT_BRANCH: master
VALIDATE_YAML: true
VALIDATE_PYTHON: true
VALIDATE_MARKDOWN: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_ENV: true
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_SHELL_SHFMT: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build doxygen documentation
Build-Doxygen:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install asciidoctor mscgen graphviz doxygen
sudo apt-get install libconfig-dev
- name: Build
run: ./scripts/build.sh -d
# Build EM-ODP and run robot tests on github hosted ubuntu runner
Build-Run-on-Ubuntu-Runner:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
cc: [gcc, clang]
env:
CC: "${{matrix.cc}}"
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libconfig-dev
sudo pip3 install robotframework
sudo apt-get install libcli-dev
sudo apt-get install telnet
- name: Checkout EM-ODP
uses: actions/checkout@v3
- name: Build EM-ODP
run: ./scripts/build.sh
- name: Run Robot Tests
run: |
sudo sysctl -w vm.nr_hugepages=512
grep Huge /proc/meminfo
sudo /bin/bash ./scripts/robot_test.sh
Cross-Compile-for-arm64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Cross-compile EM-ODP for arm64
run: >
sudo docker run
--privileged
-i
-v "${PWD}:/root/em-odp"
--workdir="/root/em-odp"
--shm-size 8g
-e CC="aarch64-linux-gnu-gcc"
-e TARGET_ARCH=aarch64-linux-gnu
ghcr.io/opendataplane/odp-docker-images/odp-ci-ubuntu_18.04-arm64
/root/em-odp/scripts/build.sh