-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from ns1labs/release
Release
- Loading branch information
Showing
187 changed files
with
19,816 additions
and
4,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Debug Builds | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
- release | ||
|
||
jobs: | ||
package: | ||
runs-on: ubuntu-latest | ||
|
||
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: Configure CMake to generate VERSION | ||
shell: bash | ||
working-directory: ${{github.workspace}}/build | ||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug | ||
|
||
- 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-debug" >> $GITHUB_ENV | ||
- name: Generate ref tag (develop) | ||
if: ${{ env.BRANCH_NAME == 'develop' }} | ||
run: | | ||
echo "REF_TAG=latest-develop-debug" >> $GITHUB_ENV | ||
- name: Generate ref tag (release candidate) | ||
if: ${{ env.BRANCH_NAME == 'release' }} | ||
run: | | ||
echo "REF_TAG=latest-rc-debug" >> $GITHUB_ENV | ||
- name: Debug ref tag | ||
run: echo ${{ env.REF_TAG }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build + push - pktvisor debug | ||
env: | ||
IMAGE_NAME: ns1labs/pktvisor | ||
run: | | ||
docker build . --file docker/Dockerfile.debug --tag ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} | ||
docker push -a ${{ env.IMAGE_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
name: Static 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 | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
|
||
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 ] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build and test static base | ||
run: | | ||
docker build -f docker/Dockerfile.static-base -t ns1labs/static-base . | ||
- 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=`docker run --rm -a stdout --entrypoint cat ns1labs/static-base VERSION`" >> $GITHUB_ENV | ||
- name: Debug version | ||
run: echo ${{ env.VERSION }} | ||
|
||
- name: Generate ref tag (master) | ||
if: github.event_name != 'pull_request' && ${{ env.BRANCH_NAME == 'master' }} | ||
run: | | ||
echo "REF_TAG=latest" >> $GITHUB_ENV | ||
- name: Generate ref tag (develop) | ||
if: github.event_name != 'pull_request' && ${{ env.BRANCH_NAME == 'develop' }} | ||
run: | | ||
echo "REF_TAG=latest-develop" >> $GITHUB_ENV | ||
- name: Generate ref tag (release candidate) | ||
if: github.event_name != 'pull_request' && ${{ env.BRANCH_NAME == 'release' }} | ||
run: | | ||
echo "REF_TAG=latest-rc" >> $GITHUB_ENV | ||
- name: Debug ref tag | ||
if: github.event_name != 'pull_request' | ||
run: echo ${{ env.REF_TAG }} | ||
|
||
- name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push static pktvisord container | ||
if: github.event_name != 'pull_request' | ||
env: | ||
BASE_BINARY: pktvisord | ||
IMAGE_NAME: ns1labs/pktvisord-slim | ||
run: | | ||
docker build -f docker/Dockerfile.${{ env.BASE_BINARY }}-static -t ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} -t ${{ env.IMAGE_NAME }}:${{ env.VERSION }} . | ||
docker push -a ${{ env.IMAGE_NAME }} | ||
echo "CONT_ID=$(docker create --name ${{ env.BASE_BINARY }}-slim-tmp ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }})" >> $GITHUB_ENV | ||
- name: Extract static pktvisord asset | ||
if: github.event_name != 'pull_request' | ||
env: | ||
BASE_BINARY: pktvisord | ||
IMAGE_NAME: ns1labs/pktvisord-slim | ||
run: | | ||
docker cp ${{ env.CONT_ID }}:/${{ env.BASE_BINARY }} ${{github.workspace}}/${{ env.BASE_BINARY }}-linux-x86_64-${{ env.VERSION }} | ||
- name: Upload pktvisord artifact | ||
if: github.event_name != 'pull_request' | ||
env: | ||
BINARY_NAME: pktvisord-linux-x86_64-${{ env.VERSION }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.BINARY_NAME }} | ||
path: ${{github.workspace}}/${{ env.BINARY_NAME }} | ||
|
||
- name: Build and push static pktvisor-reader container | ||
if: github.event_name != 'pull_request' | ||
env: | ||
BASE_BINARY: pktvisor-reader | ||
IMAGE_NAME: ns1labs/pktvisor-reader | ||
run: | | ||
docker build -f docker/Dockerfile.${{ env.BASE_BINARY }}-static -t ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }} -t ${{ env.IMAGE_NAME }}:${{ env.VERSION }} . | ||
docker push -a ${{ env.IMAGE_NAME }} | ||
echo "CONT_ID=$(docker create --name ${{ env.BASE_BINARY }}-slim-tmp ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }})" >> $GITHUB_ENV | ||
- name: Extract static pktvisor-reader asset | ||
if: github.event_name != 'pull_request' | ||
env: | ||
BASE_BINARY: pktvisor-reader | ||
IMAGE_NAME: ns1labs/pktvisor-reader | ||
run: | | ||
docker cp ${{ env.CONT_ID }}:/${{ env.BASE_BINARY }} ${{github.workspace}}/${{ env.BASE_BINARY }}-linux-x86_64-${{ env.VERSION }} | ||
- name: Upload pktvisor-reader artifact | ||
if: github.event_name != 'pull_request' | ||
env: | ||
BINARY_NAME: pktvisor-reader-linux-x86_64-${{ env.VERSION }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.BINARY_NAME }} | ||
path: ${{github.workspace}}/${{ env.BINARY_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
project(fstrm) | ||
|
||
add_library(fstrm | ||
fstrm/control.c | ||
fstrm/file.c | ||
fstrm/iothr.c | ||
fstrm/rdwr.c | ||
fstrm/reader.c | ||
fstrm/tcp_writer.c | ||
fstrm/time.c | ||
fstrm/unix_writer.c | ||
fstrm/writer.c | ||
libmy/argv.c | ||
libmy/my_queue_mb.c | ||
libmy/my_queue_mutex.c | ||
) | ||
add_library(fstrm::fstrm ALIAS fstrm) | ||
target_compile_options(fstrm PRIVATE -Wno-pedantic) | ||
|
||
target_include_directories(fstrm | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>> | ||
) | ||
|
||
set(FSTRM_HEADERS | ||
fstrm/fstrm.h | ||
) | ||
set_target_properties(fstrm PROPERTIES PUBLIC_HEADER "${FSTRM_HEADERS}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2014 by Farsight Security, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.