-
Notifications
You must be signed in to change notification settings - Fork 28
Create .deb packages for ydb c++ sdk and plugins. #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a9889e5
first raw version of a debian package
f158faa
proper functioning .deb packages for the sdk and plugins
94900ab
update readme accordingly
1cfb2aa
add .deb tests
2fa99d7
Use system googleapis and generate debian dir from script
f0d3666
fix protoc failures
b4f983e
fix tests
8e80795
fix ci failures
d1065db
fix: add otel to build
d7eddae
fix otel vendoring
a9dcb69
add ppa upload script
515e1bf
finish .debs with a releaseworkflow
5c333b9
fix build errors
d8b5210
fix issues
96644df
fix issues
bb2c978
fix .deb package build
9713e57
Restore compatibility with make 3.5
Shfdis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,128 @@ | ||
| name: Publish release artifacts | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: "Release tag to attach assets to (e.g. v1.2.3)" | ||
| required: true | ||
| type: string | ||
|
|
||
| concurrency: | ||
| group: release-publish-${{ github.event.release.tag_name || inputs.tag }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| build-and-upload-debs: | ||
| name: "Build .deb packages and attach to release (Ubuntu 24.04 / noble)" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Resolve release tag | ||
| id: tag | ||
| run: | | ||
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | ||
| echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" | ||
| echo "ref=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" | ||
| echo "ref=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| ref: ${{ steps.tag.outputs.ref }} | ||
|
|
||
| - name: Build .deb packages in Ubuntu 24.04 container | ||
| shell: bash | ||
| run: | | ||
| mkdir -p artifacts | ||
| docker run --rm --network host \ | ||
| -v "$PWD:/source" \ | ||
| ubuntu:24.04 \ | ||
| bash -c ' | ||
| set -e | ||
| export DEBIAN_FRONTEND=noninteractive | ||
| apt-get update | ||
| apt-get install -y \ | ||
| build-essential \ | ||
| cmake \ | ||
| pkg-config \ | ||
| git \ | ||
| libidn11-dev \ | ||
| libssl-dev \ | ||
| zlib1g-dev \ | ||
| libprotobuf-dev \ | ||
| protobuf-compiler \ | ||
| libgrpc++-dev \ | ||
| protobuf-compiler-grpc \ | ||
| libbrotli-dev \ | ||
| liblz4-dev \ | ||
| libzstd-dev \ | ||
| libbz2-dev \ | ||
| libxxhash-dev \ | ||
| libsnappy-dev \ | ||
| libdouble-conversion-dev \ | ||
| libgtest-dev \ | ||
| libre2-dev \ | ||
| libc-ares-dev \ | ||
| rapidjson-dev \ | ||
| python3 \ | ||
| python3-six \ | ||
| ragel \ | ||
| yasm | ||
|
|
||
| cd /source | ||
| cmake -S scripts/googleapis_deb -B build_googleapis_deb -DCMAKE_INSTALL_PREFIX=/usr/share/yandex | ||
| cmake --build build_googleapis_deb -j$(nproc) | ||
| cmake --build build_googleapis_deb --target package | ||
| dpkg -i build_googleapis_deb/*.deb | ||
|
|
||
| ./scripts/generate-debian-directory.sh | ||
| cmake -S . -B build-deb \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DYDB_SDK_INSTALL=ON \ | ||
| -DYDB_SDK_EXAMPLES=OFF \ | ||
| -DYDB_SDK_TESTS=OFF \ | ||
| -DYDB_SDK_ENABLE_OTEL_METRICS=ON \ | ||
| -DYDB_SDK_ENABLE_OTEL_TRACE=ON \ | ||
| -DBUILD_SHARED_LIBS=OFF \ | ||
| -DYDB_SDK_USE_SYSTEM_GOOGLEAPIS=ON \ | ||
| -DCMAKE_INSTALL_PREFIX=/usr/share/yandex \ | ||
| -DCMAKE_PREFIX_PATH="/usr/share/yandex" | ||
| cmake --build build-deb --target package -j$(nproc) | ||
|
|
||
| cp build_googleapis_deb/*.deb /source/artifacts/ | ||
| cp build-deb/*.deb /source/artifacts/ | ||
| ' | ||
|
|
||
| - name: Smoke-test generated .deb packages | ||
| shell: bash | ||
| run: | | ||
| ./scripts/test_deb_packages.sh artifacts | ||
|
|
||
| - name: List built artifacts | ||
| shell: bash | ||
| run: ls -la artifacts/ | ||
|
|
||
| - name: Upload .deb files to GitHub release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| shell: bash | ||
| run: | | ||
| gh release upload "${{ steps.tag.outputs.tag }}" artifacts/*.deb --clobber | ||
|
|
||
| - name: Upload .deb files as workflow artifact | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: deb-packages-${{ steps.tag.outputs.tag }} | ||
| path: artifacts/*.deb | ||
| if-no-files-found: warn | ||
| retention-days: 30 |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -83,3 +83,4 @@ CMakeUserPresets.json | |
|
|
||
| # Dev Containers | ||
| !Dockerfile | ||
| debian/ | ||
This file contains hidden or 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 hidden or 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,15 @@ | ||
| set(CMAKE_HOST_SYSTEM "Linux-5.4.210-39.1.pagevecsize") | ||
| set(CMAKE_HOST_SYSTEM_NAME "Linux") | ||
| set(CMAKE_HOST_SYSTEM_VERSION "5.4.210-39.1.pagevecsize") | ||
| set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") | ||
|
|
||
|
|
||
|
|
||
| set(CMAKE_SYSTEM "Linux-5.4.210-39.1.pagevecsize") | ||
| set(CMAKE_SYSTEM_NAME "Linux") | ||
| set(CMAKE_SYSTEM_VERSION "5.4.210-39.1.pagevecsize") | ||
| set(CMAKE_SYSTEM_PROCESSOR "x86_64") | ||
|
|
||
| set(CMAKE_CROSSCOMPILING "FALSE") | ||
|
|
||
| set(CMAKE_SYSTEM_LOADED 1) | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.