Skip to content

Commit

Permalink
new test
Browse files Browse the repository at this point in the history
  • Loading branch information
leoparente committed Jan 16, 2025
1 parent 14cccbb commit a6d55da
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/actions/build-cpp/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ function build() {
cp -rf /github/workspace/libs/ /pktvisor-src/libs/
cp -rf /github/workspace/docker/ /pktvisor-src/docker/
cp -rf /github/workspace/golang/ /pktvisor-src/golang/
cp -rf /github/workspace/build/ /pktvisor-src/build/
cp -rf /github/workspace/integration_tests/ /pktvisor-src/integration_tests/
cp -rf /github/workspace/cmake/ /pktvisor-src/cmake/
cp -rf /github/workspace/CMakeLists.txt /pktvisor-src/
cp -rf /github/workspace/conanfile.py /pktvisor-src/
cp -rf /github/workspace/.conanrc /pktvisor-src/
cd /pktvisor-src/build/
cd /pktvisor-src/
conan profile detect -f
cd /pktvisor-src/build/
PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DASAN=$INPUT_ASAN ..
make all -j 4
}
Expand Down
43 changes: 33 additions & 10 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,39 @@ jobs:
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
restore-keys: conan-${{ runner.os }}-

- name: Build pktvisord + push symbol to bugsplat.com
uses: ./.github/actions/build-cpp
with:
context: "."
build_type: "Release"
asan: "OFF"
bugsplat_key: ${{secrets.BUGSPLAT_KEY}}
bugsplat_symbol_url: ${{secrets.BUGSPLAT_SYMBOL_URL}}
bugsplat: "true"
file: "./Dockerfile"
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DCODE_COVERAGE=ON

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

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config Debug -- -j 4

- name: move files
shell: bash
run: |
cp -rf ${{github.workspace}}/build/bin/pktvisord ${{github.workspace}}/pktvisord
strip -s ${{github.workspace}}/build/bin/crashpad_handler
cp -rf ${{github.workspace}}/build/bin/crashpad_handler ${{github.workspace}}/crashpad_handler
cp -rf ${{github.workspace}}/build/bin/pktvisor-reader ${{github.workspace}}/pktvisor-reader
cp -rf ${{github.workspace}}/golang/pkg/client/version.go ${{github.workspace}}/version.go
cp -rf ${{github.workspace}}/src/tests/fixtures/pktvisor-port-service-names.csv ${{github.workspace}}/custom-iana.csv
- name: Push symbols to bugsplat
shell: bash
run: |
wget https://github.com/orb-community/CrashpadTools/raw/main/linux/dump_syms
chmod a+x ./dump_syms
wget https://github.com/orb-community/CrashpadTools/raw/main/linux/symupload
chmod a+x ./symupload
./dump_syms ${{github.workspace}}/pktvisord > pktvisor.sym
./symupload -k ${{secrets.BUGSPLAT_KEY}} pktvisor.sym ${{secrets.BUGSPLAT_SYMBOL_URL}}${{env.VERSION}} 2>/dev/null
- name: Build pktvisor-cli
uses: ./.github/actions/build-go
Expand Down
44 changes: 33 additions & 11 deletions .github/workflows/build_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,39 @@ jobs:
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.py', '*/conanfile.py') }}
restore-keys: conan-${{ runner.os }}-

- name: Build pktvisord + push symbol to backtrace.io
uses: ./.github/actions/build-cpp
with:
context: "."
build_type: "Debug"
asan: "ON"
symbol_url: ${{secrets.SYMBOL_URL}}
bugsplat_key: ${{secrets.BUGSPLAT_KEY}}
bugsplat_symbol_url: ${{secrets.BUGSPLAT_SYMBOL_URL}}
bugsplat: "true"
file: "./Dockerfile"
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=./cmake/conan_provider.cmake -DCODE_COVERAGE=ON

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

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config Debug -- -j 4

- name: move files
shell: bash
run: |
cp -rf ${{github.workspace}}/build/bin/pktvisord ${{github.workspace}}/pktvisord
strip -s ${{github.workspace}}/build/bin/crashpad_handler
cp -rf ${{github.workspace}}/build/bin/crashpad_handler ${{github.workspace}}/crashpad_handler
cp -rf ${{github.workspace}}/build/bin/pktvisor-reader ${{github.workspace}}/pktvisor-reader
cp -rf ${{github.workspace}}/golang/pkg/client/version.go ${{github.workspace}}/version.go
cp -rf ${{github.workspace}}/src/tests/fixtures/pktvisor-port-service-names.csv ${{github.workspace}}/custom-iana.csv
- name: Push symbols to bugsplat
shell: bash
run: |
wget https://github.com/orb-community/CrashpadTools/raw/main/linux/dump_syms
chmod a+x ./dump_syms
wget https://github.com/orb-community/CrashpadTools/raw/main/linux/symupload
chmod a+x ./symupload
./dump_syms ${{github.workspace}}/pktvisord > pktvisor.sym
./symupload -k ${{secrets.BUGSPLAT_KEY}} pktvisor.sym ${{secrets.BUGSPLAT_SYMBOL_URL}}${{env.VERSION}} 2>/dev/null
- name: Build pktvisor-cli
uses: ./.github/actions/build-go
Expand Down

0 comments on commit a6d55da

Please sign in to comment.