Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic builds (mostly) #968

Merged
merged 77 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
90c9c70
new: initial dynamic build changes
fntlnz Dec 10, 2019
f7ea2c0
new: fix lyaml dependencies
fntlnz Dec 11, 2019
becda9c
new: organize cmake dependencies better
fntlnz Dec 11, 2019
308c721
new: cpack under cmake folder
fntlnz Dec 11, 2019
c3f7d01
new: use travis as the actual build environment
fntlnz Dec 11, 2019
57f5a05
new: reorganize cmakelists.txt
fntlnz Dec 11, 2019
35398c3
fix: use libssl-dev instead of openssl-dev
fntlnz Dec 12, 2019
02c0b75
build: include Coverage and add headers
fntlnz Dec 12, 2019
f78775e
build: fix building from the falcosecurity folder
fntlnz Dec 12, 2019
66560ef
build: allow building gRPC as an alternative to dynamic linking
fntlnz Dec 12, 2019
67df778
build: libjq-dev in travis
fntlnz Dec 12, 2019
436f5a2
new: cmake format colums to 120
fntlnz Dec 12, 2019
43cecf6
build: libyaml-cpp-dev in travis
fntlnz Dec 12, 2019
f92f203
fix: allow gRPC to take protobuf from custom pkgconfig path
fntlnz Dec 12, 2019
892e3fa
build: allow jq to be compiled statically optionally
fntlnz Dec 12, 2019
c33fc75
build: allow yamlcpp to be compiled statically optionally
fntlnz Dec 12, 2019
7804f50
new: allow protobuf to be compiled statically optionally
fntlnz Dec 12, 2019
6dda4fe
update(docker/builder): install build dependencies in builder
fntlnz Dec 12, 2019
f5d9262
build(CMakeLists): include external dependencies from file
fntlnz Dec 12, 2019
a6fc9f6
build: add missing grpc dependencies on travis
fntlnz Dec 12, 2019
87ac4f4
build: yaml-cpp cmake module
fntlnz Dec 13, 2019
b9dde07
build: jq cmake module
fntlnz Dec 13, 2019
7b1de13
build: gRPC cmake module
fntlnz Dec 13, 2019
8bee9bb
build: delete unused cmake modules
fntlnz Dec 13, 2019
2f51b38
build: cURL cmake module
fntlnz Dec 13, 2019
fae96c4
build(docker/builder): adapt entrypoint to the new dependencies
fntlnz Dec 13, 2019
af84160
build: bump cmake version to 3.5.1 and modules
fntlnz Dec 13, 2019
e4bbd73
build(cmake/cpack): fix cmake options script
fntlnz Dec 13, 2019
849fdff
build: build all the targets on travis
fntlnz Dec 13, 2019
360849e
build: gRPC fixes for the bundled path
fntlnz Dec 16, 2019
6785c86
ci: enable tests on plain travis
fntlnz Dec 16, 2019
8659a68
build: gRPC absolute library dir
fntlnz Dec 17, 2019
6b2e36a
build: move process count variable and USE_BUNDLED_DEPS option to mai…
leodido Dec 17, 2019
1aac5cf
build: fix zlib message for dynamically built gRPC
leodido Dec 17, 2019
38eb064
build: libsinsp and libscap from external project
leodido Dec 17, 2019
5558b2c
build: find makedev cmake module
leodido Dec 17, 2019
13b90cb
wip: libsinsp as external project add
leodido Dec 17, 2019
be09185
build: external project add for sysdig
leodido Dec 18, 2019
84e23e4
build: execute inner cmake for sysdig deps
leodido Dec 18, 2019
5353573
build: dependencies for sinsp target
leodido Dec 18, 2019
c2cf424
build: download sysdig deps from GitHub archive by git reference
leodido Dec 18, 2019
2bd6991
build: include GNUInstallDirs module
leodido Dec 18, 2019
7f00c1a
build: remove unused code from main CMakeLists.txt
leodido Dec 18, 2019
5e0f179
build: use SYSDIG_SOURCE_DIR into falco CMakeLists.txt files
leodido Dec 18, 2019
dbab86f
build: out-of-source build for sysdig deps (CMake 3.5)
leodido Dec 19, 2019
e3d099a
build: cmake falco target deps
leodido Dec 19, 2019
96c302c
chore: better names for sysdig dependencies cmake
leodido Dec 19, 2019
cc2add1
update(docker/builder): having a sibling sysdig deps directory is no
leodido Dec 19, 2019
088ddaf
build: remove not needed submodules from gRPC
fntlnz Dec 19, 2019
ffcde13
build: scap compiler definitions for gnu source
fntlnz Dec 19, 2019
6e395f7
build: pkgconfig not needed by gRPC anymore
fntlnz Dec 19, 2019
c04f6eb
build: initial circleci configuration
fntlnz Jan 14, 2020
b6bb0e7
build: initial build step in circle
fntlnz Jan 14, 2020
822afc2
build: falco builder and integration tests step
fntlnz Jan 14, 2020
529d208
build: initial workflow
fntlnz Jan 15, 2020
673569a
build: parallel execution
fntlnz Jan 15, 2020
7b97192
build: falco tester automatic version
fntlnz Jan 15, 2020
2d027e6
build: store release artifacts
fntlnz Jan 15, 2020
11d21d1
build: persist only build folder
fntlnz Jan 15, 2020
cc2c205
docs: webserver is now enabled by default
fntlnz Jan 16, 2020
54719ca
build(docker/tester): rename prepare artifacts step
fntlnz Jan 16, 2020
5557c1b
build(civetweb): openssl api parameter was not considered
fntlnz Jan 16, 2020
e6dae7f
chore: rename circle CI step names
leodido Jan 16, 2020
a245c4e
update: use 2 processor (circle) during make
leodido Jan 16, 2020
0f99467
update: configure JOBS number for centos7 build (circleci)
leodido Jan 16, 2020
9145acc
update: reducing circleci number of jobs to 1
leodido Jan 16, 2020
6a0730c
fix: make gRPC with j equal 1 to avoid circleci to oom
leodido Jan 16, 2020
b38b2ee
fix(cmake/modules): add system libyaml as dep for DEB packages
leodido Jan 16, 2020
83101ce
fix(docker/local): adding libyaml
leodido Jan 16, 2020
57ca742
build(cmake): fix sysdig and gRPC dependencies for gcc8
fntlnz Jan 17, 2020
5a707f6
build(docker/tester): remove openssl compat libraries
fntlnz Jan 17, 2020
423924a
build(docker/builder): vanilla CentOS 8 for the builder
fntlnz Jan 17, 2020
0bdbcf6
update(docker/tester): switch to fedora:31
leodido Jan 17, 2020
0c35107
chore(cmake): format
leodido Jan 17, 2020
aee706d
build: add source in persisted workspace for integration tests
fntlnz Jan 17, 2020
9664ef1
chore: rename circleci names to centos8
leodido Jan 17, 2020
c0a457c
chore: CMakeLists refinements
leodido Jan 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
version: 2
jobs:
# Build using ubuntu LTS
# This build is dynamic, most dependencies are taken from the OS
"build/ubuntu-bionic":
docker:
- image: ubuntu:bionic
steps:
- checkout
- run:
name: Update base image
command: apt update -y
- run:
name: Install dependencies
command: apt install libssl-dev libyaml-dev libncurses-dev libc-ares-dev libprotobuf-dev protobuf-compiler libjq-dev libyaml-cpp-dev libgrpc++-dev protobuf-compiler-grpc rpm linux-headers-$(uname -r) libelf-dev cmake build-essential libcurl4-openssl-dev -y
- run:
name: Prepare project
command: |
mkdir build
pushd build
cmake ..
popd
- run:
name: build
command: |
pushd build
make -j4 all
popd
- run:
name: run unit tests
command: |
pushd build
make tests
popd
# Build using our own builder base image using centos 7
# This build is static, dependencies are bundled in the falco binary
"build/centos8":
docker:
- image: falcosecurity/falco-builder:dynamic-builds # todo(fntlnz): replace this with the actual image once PR #968 is merged
environment:
BUILD_TYPE: "release"
steps:
- checkout:
path: /source/falco
- run:
name: Prepare project
command: /usr/bin/entrypoint cmake
- run:
name: Build
command: /usr/bin/entrypoint all
- run:
name: Run unit tests
command: /usr/bin/entrypoint tests
- run:
name: Build packages
command: /usr/bin/entrypoint package
- persist_to_workspace:
root: /
paths:
- build/release
- source
- run:
name: Prepare artifacts
command: |
mkdir -p /tmp/packages
cp /build/release/*.deb /tmp/packages
cp /build/release/*.tar.gz /tmp/packages
cp /build/release/*.rpm /tmp/packages
- store_artifacts:
path: /tmp/packages
destination: /packages
# Execute integration tests based on the build results coming from the "build/centos8" job
"tests/integration":
docker:
- image: falcosecurity/falco-tester:dynamic-builds # todo(fntlnz): replace this with the actual image once PR #968 is merged
environment:
SOURCE_DIR: "/source"
BUILD_DIR: "/build"
BUILD_TYPE: "release"
steps:
- setup_remote_docker
- attach_workspace:
at: /
- run:
name: Execute integration tests
command: /usr/bin/entrypoint test
workflows:
version: 2
build_and_test:
jobs:
- "build/ubuntu-bionic"
- "build/centos8"
- "tests/integration":
requires:
- "build/centos8"
4 changes: 2 additions & 2 deletions .cmake-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# General Formatting Options
# --------------------------
# How wide to allow formatted cmake files
line_width = 80
line_width = 120

# How many spaces to tab for indent
tab_size = 2
Expand Down Expand Up @@ -116,4 +116,4 @@ input_encoding = 'utf-8'

# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
# only claims to support utf-8 so be careful when using anything else
output_encoding = 'utf-8'
output_encoding = 'utf-8'
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ compiler: gcc
env:
- BUILD_TYPE=debug
- BUILD_TYPE=release
dist: xenial
dist: bionic
services:
- docker
before_install:
- sudo apt-get update
- sudo apt update -y
install:
- sudo apt install libssl-dev libyaml-dev libncurses-dev libc-ares-dev libprotobuf-dev protobuf-compiler libjq-dev libyaml-cpp-dev libgrpc++-dev protobuf-compiler-grpc -y
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- sudo apt-get install rpm linux-headers-$(uname -r) libelf-dev
- git clone https://github.com/draios/sysdig.git ../sysdig
- pushd ../sysdig && (git checkout "${BRANCH}" || exit 0) && echo "Using branch:" $(git rev-parse --abbrev-ref HEAD) && popd
script:
- mkdir build
- ./scripts/build "${TRAVIS_BUILD_DIR}/.." "${TRAVIS_BUILD_DIR}/build"
- pushd build && cmake .. && make -j4 all && make tests && popd
# todo(fntlnz): execute tests and regression tests at this point
#- ./scripts/build "${TRAVIS_BUILD_DIR}/.." "${TRAVIS_BUILD_DIR}/build"
Loading