Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit c8bb242

Browse files
committed
build more versions
1 parent 9bec07c commit c8bb242

File tree

2 files changed

+71
-6
lines changed

2 files changed

+71
-6
lines changed

.circleci/build-sdklt.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ set -x
66
export YAML=/usr
77
export YAML_LIBDIR=$YAML/src/.libs
88

9-
export KDIR=$HOME/linux-4.14.49-OpenNetworkLinux
9+
KERNEL_VERSION=${KERNEL_VERSION:-4.14.49}
10+
export KDIR=$HOME/linux-${KERNEL_VERSION}-OpenNetworkLinux
1011

1112
export TOOLCHAIN_DIR=/usr
1213
export TARGET_ARCHITECTURE=""
@@ -24,9 +25,9 @@ export SDK=$SDKLT/src
2425

2526
cd $SDK/appl/demo
2627
make TARGET_PLATFORM=xlr_linux clean -j
27-
make TARGET_PLATFORM=xlr_linux -j 4
28+
make TARGET_PLATFORM=xlr_linux -j 1
2829

29-
tar czf $HOME/sdklt-4.14.49.tgz \
30+
tar czf $HOME/sdklt-${KERNEL_VERSION}.tgz \
3031
-C $SDKLT/src/appl/linux/build/xlr_linux/lkm/knet/ linux_ngknet.ko \
3132
-C $SDKLT/src/appl/linux/build/xlr_linux/lkm/bde/ linux_ngbde.ko \
3233
-C $SDKLT/src/appl/demo/build/xlr_linux/ sdklt \

.circleci/config.yml

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,68 @@
1616

1717
version: 2.1
1818

19+
commands:
20+
build-sdklt:
21+
description: "Build SDKLT for a given Kernel version"
22+
parameters:
23+
kernel_version:
24+
type: string
25+
steps:
26+
- run:
27+
name: Setup build environment
28+
command: |
29+
apt update
30+
apt install -y --no-install-recommends libyaml-dev python python-pip python-setuptools libelf-dev wget clang-8 gcc-9 make git ca-certificates ssh
31+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
32+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 10
33+
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
34+
pip install pyyaml
35+
- run:
36+
name: Get Kernel sources
37+
command: |
38+
pushd $HOME
39+
wget https://github.com/opennetworkinglab/OpenNetworkLinux/releases/download/onlpv2-dev-1.0.1/linux-<< parameters.kernel_version >>-OpenNetworkLinux.tar.xz
40+
tar xf linux-<< parameters.kernel_version >>-OpenNetworkLinux.tar.xz
41+
rm linux-<< parameters.kernel_version >>-OpenNetworkLinux.tar.xz
42+
popd
43+
- checkout
44+
- run:
45+
name: Create build directory
46+
command: mkdir -p ~/build
47+
# - run:
48+
# name: Build SDKLT
49+
# command: |
50+
# export ADD_CFLAGS="-fomit-frame-pointer -O3"
51+
# KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
52+
# mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-<< parameters.kernel_version >>.tgz
53+
- run:
54+
name: Build SDKLT debug
55+
command: |
56+
export ADD_CFLAGS="-g -fno-omit-frame-pointer -O0 -fsanitize=address"
57+
export ADD_LDFLAGS="-fsanitize=address"
58+
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
59+
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-debug-<< parameters.kernel_version >>.tgz
60+
- persist_to_workspace:
61+
root: ~/build/
62+
paths:
63+
# - sdklt-<< parameters.kernel_version >>.tgz
64+
- sdklt-debug-<< parameters.kernel_version >>.tgz
65+
1966
jobs:
67+
build-4-14-49:
68+
docker:
69+
- image: debian:testing
70+
steps:
71+
- build-sdklt:
72+
kernel_version: "4.14.49"
73+
74+
build-3-16-56:
75+
docker:
76+
- image: debian:testing
77+
steps:
78+
- build-sdklt:
79+
kernel_version: "3.16.56"
80+
2081
build:
2182
docker:
2283
- image: debian:testing
@@ -89,16 +150,19 @@ workflows:
89150
version: 2
90151
sdklt:
91152
jobs:
92-
- build
153+
- build-4-14-49
154+
- build-3-16-56
93155
- publish-github-release:
94156
requires:
95-
- build
157+
- build-4-14-49
158+
- build-3-16-56
96159
filters:
97160
branches:
98161
only: master
99162
- publish-github-pre-release:
100163
requires:
101-
- build
164+
- build-4-14-49
165+
- build-3-16-56
102166
filters:
103167
branches:
104168
ignore: master

0 commit comments

Comments
 (0)