fix: Adjust the CI workflows (#5700)

This commit is contained in:
Bart
2025-08-19 12:46:38 -04:00
committed by GitHub
parent b04d239926
commit afc05659ed
8 changed files with 84 additions and 110 deletions

View File

@@ -3,46 +3,37 @@
# provided.
name: Build Conan dependencies
# Note that actions do not support 'type' and all inputs are strings, see
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
inputs:
build_dir:
description: 'The directory where to build.'
required: true
type: string
build_type:
description: 'The build type to use.'
description: 'The build type to use ("Debug", "Release").'
required: true
type: choice
options:
- 'Debug'
- 'Release'
conan_remote_name:
description: 'The name of the Conan remote to use.'
required: true
type: string
conan_remote_url:
description: 'The URL of the Conan endpoint to use.'
required: true
type: string
conan_remote_username:
description: 'The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
required: false
type: string
default: ''
conan_remote_password:
description: 'The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
required: false
type: string
default: ''
force_build:
description: 'Force building of all dependencies.'
description: 'Force building of all dependencies ("true", "false").'
required: false
type: boolean
default: false
default: 'false'
force_upload:
description: 'Force uploading of all dependencies.'
description: 'Force uploading of all dependencies ("true", "false").'
required: false
type: boolean
default: false
default: 'false'
runs:
using: composite
@@ -55,17 +46,17 @@ runs:
cd ${{ inputs.build_dir }}
conan install \
--output-folder . \
--build ${{ inputs.force_build && '"*"' || 'missing' }} \
--build ${{ inputs.force_build == 'true' && '"*"' || 'missing' }} \
--options:host '&:tests=True' \
--options:host '&:xrpld=True' \
--settings:all build_type=${{ inputs.build_type }} \
--format=json ..
- name: Upload Conan dependencies
if: ${{ inputs.conan_remote_username && inputs.conan_remote_password }}
if: ${{ inputs.conan_remote_username != '' && inputs.conan_remote_password != '' }}
shell: bash
working-directory: ${{ inputs.build_dir }}
run: |
echo "Logging into Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
conan remote login ${{ inputs.conan_remote_name }} "${{ inputs.conan_remote_username }}" --password "${{ inputs.conan_remote_password }}"
echo 'Uploading dependencies.'
conan upload '*' --confirm --check ${{ inputs.force_upload && '--force' || '' }} --remote=${{ inputs.conan_remote_name }}
conan upload '*' --confirm --check ${{ inputs.force_upload == 'true' && '--force' || '' }} --remote=${{ inputs.conan_remote_name }}