Skip to content

Commit

Permalink
Fix Protobuf directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubrak committed Oct 19, 2023
1 parent 4e1a6f7 commit 64aefdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build-test-and-publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: mv ${{ github.workspace }}/LICENSE ${{ env.ARTIFACT_PATH }}/LICENSE

- name: Move protobuf model to artifact directory
run: mv ${{ env.RELEASE_PATH }}/libebpfdiscoveryproto/proto/ebpfdiscoveryproto ${{ env.ARTIFACT_PATH }}/ebpfdiscoveryproto
run: mv ${{ env.RELEASE_PATH }}/libebpfdiscoveryproto/ebpfdiscoveryproto ${{ env.ARTIFACT_PATH }}/ebpfdiscoveryproto

- name: Move binaries to artifact directory
run: mv ${{ env.RELEASE_PATH }}/bin ${{ env.ARTIFACT_PATH }}/bin
Expand All @@ -54,11 +54,7 @@ jobs:
cd ${{ env.ARTIFACT_PATH }}
zip -r ${{ env.ARTIFACT_VERSION }}.zip .
- name: Login to GitHub OCI registry
run: printf "%s" ${{ secrets.GITHUB_TOKEN }} | oras login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Publish zip to GitHub OCI registry
run: |
cd ${{ env.ARTIFACT_PATH }}
oras push ${{ env.GITHUB_OCI_REGISTRY_ADDRESS }}/${{ env.LOWERCASE_REPOSITORY_NAME }}-linux-x86_64:${{ env.ARTIFACT_VERSION }} ${{ env.ARTIFACT_VERSION }}.zip
oras push ${{ env.GITHUB_OCI_REGISTRY_ADDRESS }}/${{ env.LOWERCASE_REPOSITORY_NAME }}-linux-x86_64:latest ${{ env.ARTIFACT_VERSION }}.zip
printf "%s" ${{ secrets.GITHUB_TOKEN }} | docker run --rm -i -v $(pwd):/workspace ghcr.io/oras-project/oras:v1.0.1 push -u ${{ github.actor }} --password-stdin ${{ env.GITHUB_OCI_REGISTRY_ADDRESS }}/${{ env.LOWERCASE_REPOSITORY_NAME }}-linux-x86_64:${{ env.ARTIFACT_VERSION }},latest ${{ env.ARTIFACT_VERSION }}.zip
8 changes: 2 additions & 6 deletions libebpfdiscoveryproto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
set(PROTO_DIR_NAME proto)

list(
APPEND
PROTO_SOURCES
${PROTO_DIR_NAME}/ebpfdiscoveryproto/example.proto
ebpfdiscoveryproto/example.proto
)

set(TARGET ebpfdiscoveryproto)

include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_SOURCES})

add_library(${TARGET} STATIC ${PROTO_SRCS})
target_link_libraries(${TARGET} protobuf::libprotobuf)
target_include_directories(${TARGET} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/${PROTO_DIR_NAME})
target_include_directories(${TARGET} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})

0 comments on commit 64aefdd

Please sign in to comment.