-
Notifications
You must be signed in to change notification settings - Fork 26
RSDK-12326: Job for publishing conan artifacts to server #494
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
Changes from 11 commits
9e0c434
96aee0f
9c320d4
3a460a9
9e10be2
9a62ae4
28ca03e
7e693a9
b0dda52
0850b35
2bfbf71
13bba06
92b08f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,20 +51,20 @@ jobs: | |
| # do have permissions for. See https://github.com/bufbuild/buf/issues/2698 for | ||
| # more details. | ||
| export BUF_CONFIG_DIR=$(mktemp -d) | ||
| conan profile detect | ||
| conan create . --build=missing -s:a compiler.cppstd=17 -s:a "&:shared=False" | ||
| conan upload "viam-cpp-sdk/*" -r viamconan | ||
| conan create . --build=missing -s:a compiler.cppstd=17 -o:a "&:shared=False" | ||
| conan upload "viam-cpp-sdk/*" -r viamconan -c | ||
|
|
||
| - name: Upload additional deps | ||
| if: inputs.upload_deps | ||
| run: | | ||
| conan upload "boost/*" -r viamconan | ||
| conan upload "grpc/*" -r viamconan | ||
| conan upload "protobuf/*" -r viamconan | ||
| conan upload "boost/*" -r viamconan -c | ||
| conan upload "grpc/*" -r viamconan -c | ||
| conan upload "protobuf/*" -r viamconan -c | ||
|
|
||
|
|
||
| build_linux: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| runner: [buildjet-8vcpu-ubuntu-2204, buildjet-8vcpu-ubuntu-2204-arm] | ||
| image: [ubuntu:22.04, debian:bookworm] | ||
|
|
@@ -107,6 +107,9 @@ jobs: | |
| sudo \ | ||
| wget \ | ||
|
|
||
| c++ --version | ||
| ldd --version | ||
|
|
||
| - name: Install cmake (jammy) | ||
| if: matrix.image == 'ubuntu:22.04' | ||
| run: | | ||
|
|
@@ -129,6 +132,8 @@ jobs: | |
| python3 -m venv ./conan_venv | ||
| . ./conan_venv/bin/activate | ||
|
|
||
| pip install conan | ||
|
|
||
| conan profile detect | ||
| conan remote add viamconan $CONAN_REMOTE_URL | ||
| conan remote auth -cc core:non_interactive=True viamconan | ||
|
|
@@ -137,12 +142,70 @@ jobs: | |
| run: | | ||
| . ./conan_venv/bin/activate | ||
|
|
||
| conan create . --build=missing -s:a compiler.cppstd=17 -s:a "&:shared=False" | ||
| conan upload "viam-cpp-sdk/*" -r viamconan | ||
| conan create . --build=missing -s:a compiler.cppstd=17 -o:a "&:shared=False" | ||
| conan upload "viam-cpp-sdk/*" -r viamconan -c | ||
|
|
||
| - name: Upload additional deps | ||
| if: inputs.upload_deps && !(matrix.runner == 'buildjet-8vcpu-ubuntu-2204' && matrix.image == 'ubuntu:22.04') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (q) curious about the runner/image constraint here, what's the reason for it?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's the runner/image where we get 100% cache hits from the conan center repo, so there's no need for us to duplicate their binaries in our instance |
||
| run: | | ||
| conan upload "boost/*" -r viamconan -c | ||
| conan upload "grpc/*" -r viamconan -c | ||
| conan upload "protobuf/*" -r viamconan -c | ||
|
|
||
| build_windows: | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: releases/${{ inputs.ref }} | ||
|
|
||
| - name: Install dependencies | ||
| run: choco install -y conan git | ||
|
|
||
| - name: Set up python/conan | ||
| shell: powershell | ||
| run: | | ||
| $ErrorActionPreference = "Stop" | ||
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | ||
| refreshenv | ||
|
|
||
| conan profile detect | ||
|
|
||
| conan remote add viamconan $env:CONAN_REMOTE_URL | ||
| conan remote auth -cc core:non_interactive=True viamconan | ||
| env: | ||
| CONAN_REMOTE_URL: ${{ secrets.conanRemote }} | ||
| CONAN_LOGIN_USERNAME_VIAMCONAN: ${{ secrets.conanUsername}} | ||
| CONAN_PASSWORD_VIAMCONAN: ${{ secrets.conanPassword }} | ||
| CONAN_USER_HOME: c:/cache | ||
| CONAN_USER_HOME_SHORT: c:/cache/conan_shortpaths | ||
|
|
||
| - name: Create and upload package | ||
| shell: powershell | ||
| run: | | ||
| $ErrorActionPreference = "Stop" | ||
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | ||
| refreshenv | ||
|
|
||
| conan create . --build=missing -o "&:shared=False" -s:a compiler.cppstd=17 | ||
| conan upload "viam-cpp-sdk/*" -r viamconan -c | ||
| env: | ||
| CONAN_USER_HOME: c:/cache | ||
| CONAN_USER_HOME_SHORT: c:/cache/conan_shortpaths | ||
|
|
||
| - name: Upload additional deps | ||
| if: inputs.upload_deps | ||
| shell: powershell | ||
| run: | | ||
| conan upload "boost/*" -r viamconan | ||
| conan upload "grpc/*" -r viamconan | ||
| conan upload "protobuf/*" -r viamconan | ||
| $ErrorActionPreference = "Stop" | ||
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | ||
| refreshenv | ||
|
|
||
| conan upload "boost/*" -r viamconan -c | ||
| conan upload "grpc/*" -r viamconan -c | ||
| conan upload "protobuf/*" -r viamconan -c | ||
| env: | ||
| CONAN_USER_HOME: c:/cache | ||
| CONAN_USER_HOME_SHORT: c:/cache/conan_shortpaths | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(q) curious what this is doing, if anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops leftover debugging to make sure i was getting the arch/os i wanted...joys of github actions yaml 🤡