Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 19 additions & 20 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ jobs:
build-app-image-x64:
needs: [ package-amd64 ]
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
#if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -412,29 +412,22 @@ jobs:
run: |
echo "REF_TAG=latest-develop" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
echo "DRAFT=false" >> $GITHUB_ENV

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.ORB_DOCKERHUB_USERNAME }}
password: ${{ secrets.ORB_DOCKERHUB_TOKEN }}
echo "DRAFT=false" >> $GITHUB_ENV

- name: Build + push - pktvisor-cli
env:
CLI_BINARY: pktvisor-cli
IMAGE_NAME: orbcommunity/pktvisor-cli
- name: Prepare version file
run: |
docker build . --file docker/Dockerfile.pktvisor-cli --tag ${{ env.IMAGE_NAME }}:${{ env.VERSION }} --tag ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }}
docker push -a ${{ env.IMAGE_NAME }}
echo "CONT_ID=$(docker create --name ${{ env.CLI_BINARY }}-slim-tmp ${{ env.IMAGE_NAME }}:${{ env.REF_TAG }})" >> $GITHUB_ENV
cp -rpf golang/pkg/client/version.go .

- name: Extract static pktvisor-cli asset
env:
CLI_BINARY: pktvisor-cli
IMAGE_NAME: orbcommunity/pktvisor-cli
- name: Build pktvisor-cli
uses: ./.github/actions/build-go
with:
context: "."
file: "./Dockerfile"

- name: Debug and Rename artifacts
run: |
docker cp ${{ env.CONT_ID }}:/${{ env.CLI_BINARY }} ${{github.workspace}}/${{ env.CLI_BINARY }}-linux-x86_64-${{ env.VERSION }}
ls -lha .
mv pktvisor-cli pktvisor-cli-linux-x86_64-${{ env.VERSION }}

- name: Upload pktvisor-cli artifact
env:
Expand All @@ -443,6 +436,12 @@ jobs:
with:
name: ${{ env.BINARY_NAME }}
path: ${{github.workspace}}/${{ env.BINARY_NAME }}

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

- name: Build + push - pktvisor-prom-write
env:
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/cross.yml → .github/workflows/build_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
pull_request:
branches:
- develop
#- release

push:
branches:
- develop
#- release


jobs:
pkvisor:
Expand Down Expand Up @@ -47,6 +47,7 @@ jobs:
with:
path: bin/sccache
key: sccache-v0.2.15

- name: Install sccache
if: steps.cache-sccache.outputs.cache-hit != 'true'
run: |
Expand All @@ -61,6 +62,7 @@ jobs:
with:
path: toolchain
key: toolchain-test-${{matrix.toolchain}}

- name: Install compiler toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
run: |
Expand All @@ -69,13 +71,15 @@ jobs:

- name: Install Conan
run: pip install --no-cache-dir 'conan==1.59.0' --force-reinstall

- name: Create Conan configuration
run: |
# init config
CONAN_V2_MODE=1 conan config init
conan config set general.revisions_enabled=1
# add custom compiler settings for libc
python3 -c 'import yaml; p = "${{env.CONAN_USER_HOME}}/.conan/settings.yml"; d = yaml.safe_load(open(p)); d["compiler"]["gcc"]["libc"] = ["None", "glibc", "musl"]; yaml.safe_dump(d, open(p, "w"))'

- name: Create Conan host profile
run: |
cat > "${{env.CONAN_USER_HOME}}/.conan/profiles/host" << "EOF"
Expand Down Expand Up @@ -109,14 +113,17 @@ jobs:
uses: actions/checkout@v3
with:
path: src

- name: Remove crashpad from conanfile
run: |
sed -i -e "s/crashpad.*//g" ${{github.workspace}}/src/conanfile.txt

- name: Install dependencies
run: |
mkdir build
cd build
conan install -pr:b default -pr:h host -g virtualenv --build=missing "${{github.workspace}}/src"

- name: Configure
run: |
cd build
Expand All @@ -131,6 +138,7 @@ jobs:
-DProtobuf_PROTOC_EXECUTABLE=$(command -v protoc) \
-DCORRADE_RC_PROGRAM=$(command -v corrade-rc) \
-DCMAKE_CXX_STANDARD_LIBRARIES=-latomic

- name: Build
run: |
cd build
Expand Down Expand Up @@ -173,15 +181,17 @@ jobs:
uses: actions/checkout@v3
with:
path: src

- name: Configure
run: |
VERSION_ONLY=1 cmake src

- name: Build
run: |
if [ "${{matrix.os}}" = macos ]; then
export GOOS=darwin
fi

if [ "${{matrix.arch}}" = armv7lh ]; then
export GOARCH=arm
elif [ "${{matrix.arch}}" = aarch64 ]; then
Expand All @@ -190,6 +200,7 @@ jobs:

cd src/golang
go build -o ${{github.workspace}}/pktvisor-cli ./cmd/pktvisor-cli

- name: Upload pktvisor-cli
uses: actions/upload-artifact@v2
with:
Expand Down
File renamed without changes.
56 changes: 0 additions & 56 deletions docker/Dockerfile.debug

This file was deleted.

6 changes: 3 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

.PHONY: clang-toolchain
.PHONY: pktvisor

# for developer environments (e.g. clion docker toolchain)
# note does not require/include the source base
clang-toolchain:
docker build --build-arg UID=$(shell id -u) -t pktvisor/clang-toolchain -f Dockerfile.clang-toolchain .
pktvisor:
docker build -t orbcommunity/pktvisor -f ./Dockerfile ..
32 changes: 0 additions & 32 deletions docker/entry.sh

This file was deleted.