mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
This change uploads the `libxrpl` library as a Conan recipe to our remote when (i) merging into the `develop` branch, (ii) committing to a PR that targets a `release*` branch, and (iii) a versioned tag is applied. Clio is only notified in the second case. The user and channel are no longer used when uploading the recipe. Specific changes are: * A `generate-version` action is added, which extracts the build version from `BuildInfo.cpp` and appends the short 7-character commit hash to it for merges into the `develop` branch and for commits to a PR that targets a `release*` branch. When a tag is applied, however, the tag itself is used as the version. This functionality has been turned into a separate action as we will use the same versioning logic for creating .rpm and .deb packages, as well as Docker images. * An `upload-recipe` action is added, which calls the `generate-version` action and further handles the uploading of the recipe to Conan. * This action is called by both the `on-pr` and `on-trigger` workflows, and a new `on-tag` workflow. The reason for this change is that we have downstream uses for the `libxrpl` library, but currently only upload the recipe to check for compatibility with Clio when making commits to a PR that targets the release branch.
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Setup Conan
|
|
description: "Set up Conan configuration, profile, and remote."
|
|
|
|
inputs:
|
|
remote_name:
|
|
description: "The name of the Conan remote to use."
|
|
required: false
|
|
default: xrplf
|
|
remote_url:
|
|
description: "The URL of the Conan endpoint to use."
|
|
required: false
|
|
default: https://conan.ripplex.io
|
|
|
|
runs:
|
|
using: composite
|
|
|
|
steps:
|
|
- name: Set up Conan configuration
|
|
shell: bash
|
|
run: |
|
|
echo 'Installing configuration.'
|
|
cat conan/global.conf ${{ runner.os == 'Linux' && '>>' || '>' }} $(conan config home)/global.conf
|
|
|
|
echo 'Conan configuration:'
|
|
conan config show '*'
|
|
|
|
- name: Set up Conan profile
|
|
shell: bash
|
|
run: |
|
|
echo 'Installing profile.'
|
|
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
|
|
|
echo 'Conan profile:'
|
|
conan profile show
|
|
|
|
- name: Set up Conan remote
|
|
shell: bash
|
|
env:
|
|
REMOTE_NAME: ${{ inputs.remote_name }}
|
|
REMOTE_URL: ${{ inputs.remote_url }}
|
|
run: |
|
|
echo "Adding Conan remote '${REMOTE_NAME}' at '${REMOTE_URL}'."
|
|
conan remote add --index 0 --force "${REMOTE_NAME}" "${REMOTE_URL}"
|
|
|
|
echo 'Listing Conan remotes.'
|
|
conan remote list
|