mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
refactor: Revamp CI workflows (#5661)
This change refactors the CI workflows to leverage the new CI Docker images for Debian, Red Hat, and Ubuntu.
This commit is contained in:
71
.github/actions/build-deps/action.yml
vendored
Normal file
71
.github/actions/build-deps/action.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
# This action installs and optionally uploads Conan dependencies to a remote
|
||||
# repository. The dependencies will only be uploaded if the credentials are
|
||||
# provided.
|
||||
name: Build Conan dependencies
|
||||
|
||||
inputs:
|
||||
build_dir:
|
||||
description: 'The directory where to build.'
|
||||
required: true
|
||||
type: string
|
||||
build_type:
|
||||
description: 'The build type to use.'
|
||||
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.'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
force_upload:
|
||||
description: 'Force uploading of all dependencies.'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install Conan dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'Installing dependencies.'
|
||||
mkdir -p ${{ inputs.build_dir }}
|
||||
cd ${{ inputs.build_dir }}
|
||||
conan install \
|
||||
--output-folder . \
|
||||
--build ${{ inputs.force_build && '"*"' || '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 }}
|
||||
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 }}
|
||||
Reference in New Issue
Block a user