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

Commit

Permalink
build more versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pudelkoM committed Feb 7, 2020
1 parent 9bec07c commit 6c0f851
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
7 changes: 4 additions & 3 deletions .circleci/build-sdklt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -x
export YAML=/usr
export YAML_LIBDIR=$YAML/src/.libs

export KDIR=$HOME/linux-4.14.49-OpenNetworkLinux
KERNEL_VERSION=${KERNEL_VERSION:-4.14.49}
export KDIR=$HOME/linux-${KERNEL_VERSION}-OpenNetworkLinux

export TOOLCHAIN_DIR=/usr
export TARGET_ARCHITECTURE=""
Expand All @@ -24,9 +25,9 @@ export SDK=$SDKLT/src

cd $SDK/appl/demo
make TARGET_PLATFORM=xlr_linux clean -j
make TARGET_PLATFORM=xlr_linux -j 4
make TARGET_PLATFORM=xlr_linux -j 2

tar czf $HOME/sdklt-4.14.49.tgz \
tar czf $HOME/sdklt-${KERNEL_VERSION}.tgz \
-C $SDKLT/src/appl/linux/build/xlr_linux/lkm/knet/ linux_ngknet.ko \
-C $SDKLT/src/appl/linux/build/xlr_linux/lkm/bde/ linux_ngbde.ko \
-C $SDKLT/src/appl/demo/build/xlr_linux/ sdklt \
Expand Down
52 changes: 36 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

version: 2.1

jobs:
build:
docker:
- image: debian:testing
commands:
build-sdklt:
description: "Build SDKLT for a given Kernel version"
parameters:
kernel_version:
type: string
steps:
- run:
name: Setup build environment
Expand All @@ -34,9 +36,9 @@ jobs:
name: Get Kernel sources
command: |
pushd $HOME
wget https://github.com/opennetworkinglab/OpenNetworkLinux/releases/download/onlpv2-dev-1.0.1/linux-4.14.49-OpenNetworkLinux.tar.xz
tar xf linux-4.14.49-OpenNetworkLinux.tar.xz
rm linux-4.14.49-OpenNetworkLinux.tar.xz
wget https://github.com/opennetworkinglab/OpenNetworkLinux/releases/download/onlpv2-dev-1.0.1/linux-<< parameters.kernel_version >>-OpenNetworkLinux.tar.xz
tar xf linux-<< parameters.kernel_version >>-OpenNetworkLinux.tar.xz
rm linux-<< parameters.kernel_version >>-OpenNetworkLinux.tar.xz
popd
- checkout
- run:
Expand All @@ -46,20 +48,35 @@ jobs:
name: Build SDKLT
command: |
export ADD_CFLAGS="-fomit-frame-pointer -O3"
.circleci/build-sdklt.sh
mv ~/sdklt-4.14.49.tgz ~/build/sdklt-4.14.49.tgz
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-<< parameters.kernel_version >>.tgz
- run:
name: Build SDKLT debug
command: |
export ADD_CFLAGS="-g -fno-omit-frame-pointer -O0 -fsanitize=address"
export ADD_LDFLAGS="-fsanitize=address"
.circleci/build-sdklt.sh
mv ~/sdklt-4.14.49.tgz ~/build/sdklt-debug-4.14.49.tgz
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-debug-<< parameters.kernel_version >>.tgz
- persist_to_workspace:
root: ~/build/
paths:
- sdklt-4.14.49.tgz
- sdklt-debug-4.14.49.tgz
- sdklt-<< parameters.kernel_version >>.tgz
- sdklt-debug-<< parameters.kernel_version >>.tgz

jobs:
build-4-14-49:
docker:
- image: debian:testing
steps:
- build-sdklt:
kernel_version: "4.14.49"

build-3-16-56:
docker:
- image: debian:testing
steps:
- build-sdklt:
kernel_version: "3.16.56"

publish-github-release:
docker:
Expand Down Expand Up @@ -89,16 +106,19 @@ workflows:
version: 2
sdklt:
jobs:
- build
- build-4-14-49
- build-3-16-56
- publish-github-release:
requires:
- build
- build-4-14-49
- build-3-16-56
filters:
branches:
only: master
- publish-github-pre-release:
requires:
- build
- build-4-14-49
- build-3-16-56
filters:
branches:
ignore: master

0 comments on commit 6c0f851

Please sign in to comment.