Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4822499
merge release/3.1.0, bump to 3.2.0-develop
weyrick Mar 12, 2021
9963485
feature/deps (#36)
weyrick Mar 15, 2021
6230598
osx github ci conan workaround: install outside of cmake (#37)
weyrick Mar 16, 2021
11929f8
feature/namespace: s/vizer/visor (#38)
weyrick Mar 16, 2021
e773e33
Get prometheus exporter building (#39)
jabyrd3 Mar 16, 2021
1bbe217
initial prometheus infrastructure (#40)
weyrick Mar 17, 2021
c1855ff
add google bench to the build (#41)
weyrick Mar 22, 2021
432423f
metric abstraction: add prometheus (#42)
weyrick Mar 23, 2021
a58536f
feature/policies (#44)
weyrick Mar 23, 2021
cb28f2d
3.2.0 prep (#45)
weyrick Mar 29, 2021
0006050
fix live rates by introducing concept of recorded stream when input i…
weyrick Apr 2, 2021
1087b77
fix build warning in maxmind
weyrick Apr 2, 2021
f162589
switch to ns1 conan server and ns1 package of PcapPlusPlus (#65)
weyrick Apr 5, 2021
cf53dcf
pcapplusplus and libpcap tuning (#66)
weyrick Apr 6, 2021
2b70a7c
remove unnecessary max mind files (#67)
weyrick Apr 6, 2021
d15ab36
fixed docker build
weyrick Apr 6, 2021
5820fda
fixed af_packet pcap source (#68)
weyrick Apr 6, 2021
1ef17ba
feature/prom docker (#69)
weyrick Apr 7, 2021
23eae75
Feature AppImage (#46)
Apr 9, 2021
cc4a50d
add option to daemonize, log to file and syslog (#70)
weyrick Apr 12, 2021
8602f1d
feature/packaging (#72)
weyrick Apr 15, 2021
b5c244d
fix packaging workflow: add conan
weyrick Apr 15, 2021
f371ab7
fix packaging workflow: docker prom write
weyrick Apr 15, 2021
ccb97f7
change artifact name
weyrick Apr 15, 2021
357237d
release candidate version
weyrick Apr 15, 2021
0a084b8
read me updates
weyrick Apr 15, 2021
a6c521e
read me updates
weyrick Apr 15, 2021
183f4da
read me updates
weyrick Apr 15, 2021
c87f141
rephrase tag to label
weyrick Apr 15, 2021
c86c0af
read me updates
weyrick Apr 15, 2021
0a727d1
configurable pktvisor tag for composite docker builds.
weyrick Apr 15, 2021
f9804da
require binary arg to appimage to be consistent with docker image.
weyrick Apr 15, 2021
08bf85a
no automatic build for master
weyrick Apr 16, 2021
508c2af
readme work
weyrick Apr 16, 2021
bbc41b5
readme work
weyrick Apr 16, 2021
91fdd63
readme work
weyrick Apr 16, 2021
ee51edb
readme work
weyrick Apr 16, 2021
eb79f32
readme work
weyrick Apr 16, 2021
7cfeee0
readme work
weyrick Apr 16, 2021
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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ cmake-build*
integration_tests/external*
Dockerfile
.dockerignore
.gitignore
.git
appimage/Dockerfile.part
appimage/export.sh
appimage/Makefile
223 changes: 223 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
name: Build

on:
workflow_dispatch:
pull_request:
branches:
- develop
- release
push:
branches:
- develop
- release

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build

- name: Get Conan
# You may pin to the exact commit or the version.
# uses: turtlebrowser/get-conan@4dc7e6dd45c8b1e02e909979d7cfc5ebba6ddbe2
uses: turtlebrowser/get-conan@v1.0

- name: Conan profile and settings
run: |
conan profile new --detect default
conan config set general.revisions_enabled=1

- name: Conan profile (linux-workaround)
if: matrix.os == 'ubuntu-latest'
run:
conan profile update settings.compiler.libcxx=libstdc++11 default

- name: Conan install (osx-workaround)
if: matrix.os == 'macos-latest'
working-directory: ${{github.workspace}}/build
run: |
conan remote add ns1labs-conan https://ns1labs.jfrog.io/artifactory/api/conan/ns1labs-conan
conan install --build=missing ..

- name: linux package install
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends golang ca-certificates jq

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE -- -j 2

- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE

package:
needs: build
runs-on: ubuntu-latest
# if this is a push into one of our main branches (rather than just a pull request), we will also package
if: github.event_name != 'pull_request'

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Get Conan
uses: turtlebrowser/get-conan@v1.0

- name: Conan profile and settings
run: |
conan profile new --detect default
conan config set general.revisions_enabled=1
conan profile update settings.compiler.libcxx=libstdc++11 default

- name: Configure CMake to generate VERSION
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Get branch name
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV

- name: Debug branch name
run: echo ${{ env.BRANCH_NAME }}

- name: Get VERSION
run: |
echo "VERSION=`cat ${{github.workspace}}/build/VERSION`" >> $GITHUB_ENV

- name: Debug version
run: echo ${{ env.VERSION }}

- name: Generate ref tag (master)
if: ${{ env.BRANCH_NAME == 'master' }}
run: |
echo "REF_TAG=latest" >> $GITHUB_ENV
echo "PRERELEASE=false" >> $GITHUB_ENV
echo "DRAFT=true" >> $GITHUB_ENV

- name: Generate ref tag (develop)
if: ${{ env.BRANCH_NAME == 'develop' }}
run: |
echo "REF_TAG=latest-develop" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
echo "DRAFT=false" >> $GITHUB_ENV

- name: Generate ref tag (release candidate)
if: ${{ env.BRANCH_NAME == 'release' }}
run: |
echo "REF_TAG=latest-rc" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
echo "DRAFT=false" >> $GITHUB_ENV

- name: Debug ref tag
run: echo ${{ env.REF_TAG }}

- name: Manage Github ref tags
uses: actions/github-script@v3
with:
github-token: ${{ github.token }}
# note deleteRef can't start with refs/, but create createRef does.
script: |
try {
await github.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/${{ env.REF_TAG }}",
})
} catch (e) {
console.log("The tag doesn't exist yet: " + e)
}
await github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ env.REF_TAG }}",
sha: context.sha
})

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build + push VERSION - pktvisor
env:
IMAGE_NAME: ns1labs/pktvisor
run: |
docker build . --file docker/Dockerfile --tag ${{ env.IMAGE_NAME }}:${{ env.VERSION }}
docker push ${{ env.IMAGE_NAME }}:${{ env.VERSION }}

- name: Tag + push docker image with ref tag (cached build) - pktvisor
env:
IMAGE_NAME: ns1labs/pktvisor
run: |
docker build . --file docker/Dockerfile --tag ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }}
docker push ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }}

- name: Build + push VERSION - pktvisor-prom-write
env:
IMAGE_NAME: ns1labs/pktvisor-prom-write
working-directory: ${{github.workspace}}/centralized_collection/prometheus/docker-grafana-agent
run: |
docker build . --file Dockerfile --build-arg PKTVISOR_TAG=${{ env.REF_TAG }} --tag ${{ env.IMAGE_NAME }}:${{ env.VERSION }}
docker push ${{ env.IMAGE_NAME }}:${{ env.VERSION }}

- name: Tag + push docker image with ref tag (cached build) - pktvisor-prom-write
env:
IMAGE_NAME: ns1labs/pktvisor-prom-write
working-directory: ${{github.workspace}}/centralized_collection/prometheus/docker-grafana-agent
run: |
docker build . --file Dockerfile --build-arg PKTVISOR_TAG=${{ env.REF_TAG }} --tag ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }}
docker push ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }}

- name: Generate AppImage
env:
IMAGE_NAME: ns1labs/pktvisor
working-directory: ${{github.workspace}}/appimage
run: |
DEV_IMAGE="${{ env.IMAGE_NAME }}:${{ env.VERSION }}" DEV_MODE=t make pktvisor-x86_64.AppImage
mv pktvisor-x86_64.AppImage pktvisor-x86_64-${{ env.VERSION }}.AppImage

- name: Upload AppImage artifact
uses: actions/upload-artifact@v2
with:
name: pktvisor-x86_64-${{ env.VERSION }}.AppImage
path: ${{github.workspace}}/appimage/pktvisor-x86_64-${{ env.VERSION }}.AppImage

112 changes: 0 additions & 112 deletions .github/workflows/cmake.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ cmake-build-*/
docs/html-documentation-generated*
integration_tests/external
golang/pkg/client/version.go
docs/internals/html
appimage/*.AppImage
1 change: 1 addition & 0 deletions 3rd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ message(STATUS "3rd party libraries")
add_subdirectory(datasketches)
add_subdirectory(rng)
add_subdirectory(timer)
add_subdirectory(libmaxminddb)
Loading