mirror of
https://github.com/XRPLF/rippled.git
synced 2026-01-25 09:05:24 +00:00
Review feedback
This commit is contained in:
6
.github/actions/generate-version/action.yml
vendored
6
.github/actions/generate-version/action.yml
vendored
@@ -13,8 +13,8 @@ runs:
|
||||
id: version
|
||||
shell: bash
|
||||
env:
|
||||
# Only append the commit hash for the develop branch. For releases the
|
||||
# version is used as-is. We will shorten it to 6 characters below.
|
||||
# Append a shortened commit hash for the develop branch. For releases
|
||||
# the version is used as-is.
|
||||
COMMIT_HASH: ${{ github.ref == 'refs/heads/develop' && github.sha || '' }}
|
||||
run: |
|
||||
echo 'Extracting version from BuildInfo.cpp.'
|
||||
@@ -26,7 +26,7 @@ runs:
|
||||
|
||||
if [[ -n "${COMMIT_HASH}" ]]; then
|
||||
echo 'Appending shortened commit hash to version.'
|
||||
VERSION="${VERSION}-${COMMIT_HASH:0:6}"
|
||||
VERSION="${VERSION}-${COMMIT_HASH:0:7}"
|
||||
fi
|
||||
|
||||
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
12
.github/actions/setup-conan/action.yml
vendored
12
.github/actions/setup-conan/action.yml
vendored
@@ -2,11 +2,11 @@ name: Setup Conan
|
||||
description: "Set up Conan configuration, profile, and remote."
|
||||
|
||||
inputs:
|
||||
conan_remote_name:
|
||||
remote_name:
|
||||
description: "The name of the Conan remote to use."
|
||||
required: false
|
||||
default: xrplf
|
||||
conan_remote_url:
|
||||
remote_url:
|
||||
description: "The URL of the Conan endpoint to use."
|
||||
required: false
|
||||
default: https://conan.ripplex.io
|
||||
@@ -36,11 +36,11 @@ runs:
|
||||
- name: Set up Conan remote
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
CONAN_REMOTE_URL: ${{ inputs.conan_remote_url }}
|
||||
REMOTE_NAME: ${{ inputs.remote_name }}
|
||||
REMOTE_URL: ${{ inputs.remote_url }}
|
||||
run: |
|
||||
echo "Adding Conan remote '${CONAN_REMOTE_NAME}' at '${CONAN_REMOTE_URL}'."
|
||||
conan remote add --index 0 --force "${CONAN_REMOTE_NAME}" "${CONAN_REMOTE_URL}"
|
||||
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
|
||||
|
||||
28
.github/actions/upload-recipe/action.yml
vendored
28
.github/actions/upload-recipe/action.yml
vendored
@@ -2,19 +2,19 @@ name: Upload Conan recipe
|
||||
description: "Upload recipe to a Conan remote."
|
||||
|
||||
inputs:
|
||||
conan_recipe_ref:
|
||||
recipe_ref:
|
||||
description: "The Conan recipe reference ('name/version') to upload."
|
||||
required: true
|
||||
conan_remote_name:
|
||||
remote_name:
|
||||
description: "The name of the Conan remote to use."
|
||||
required: true
|
||||
conan_remote_url:
|
||||
remote_url:
|
||||
description: "The URL of the Conan endpoint to use."
|
||||
required: true
|
||||
conan_remote_username:
|
||||
remote_username:
|
||||
description: "The username for logging into the Conan remote."
|
||||
required: true
|
||||
conan_remote_password:
|
||||
remote_password:
|
||||
description: "The password for logging into the Conan remote."
|
||||
required: true
|
||||
|
||||
@@ -25,22 +25,22 @@ runs:
|
||||
- name: Set up Conan
|
||||
uses: ./.github/actions/setup-conan
|
||||
with:
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
remote_name: ${{ inputs.remote_name }}
|
||||
remote_url: ${{ inputs.remote_url }}
|
||||
|
||||
- name: Log into Conan remote
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
CONAN_REMOTE_USERNAME: ${{ inputs.conan_remote_username }}
|
||||
CONAN_REMOTE_PASSWORD: ${{ inputs.conan_remote_password }}
|
||||
run: conan remote login "${CONAN_REMOTE_NAME}" "${CONAN_REMOTE_USERNAME}" --password "${CONAN_REMOTE_PASSWORD}"
|
||||
REMOTE_NAME: ${{ inputs.remote_name }}
|
||||
REMOTE_USERNAME: ${{ inputs.remote_username }}
|
||||
REMOTE_PASSWORD: ${{ inputs.remote_password }}
|
||||
run: conan remote login "${REMOTE_NAME}" "${REMOTE_USERNAME}" --password "${REMOTE_PASSWORD}"
|
||||
|
||||
- name: Upload Conan recipe
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_RECIPE_REF: ${{ inputs.conan_recipe_ref }}
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
RECIPE_REF: ${{ inputs.recipe_ref }}
|
||||
REMOTE_NAME: ${{ inputs.remote_name }}
|
||||
run: |
|
||||
conan export .
|
||||
conan upload --confirm --check --remote="${CONAN_REMOTE_NAME}" ${CONAN_RECIPE_REF}
|
||||
conan upload --confirm --check --remote="${REMOTE_NAME}" ${RECIPE_REF}
|
||||
|
||||
25
.github/workflows/on-pr.yml
vendored
25
.github/workflows/on-pr.yml
vendored
@@ -131,16 +131,33 @@ jobs:
|
||||
if: ${{ github.repository_owner == 'XRPLF' && needs.should-run.outputs.go == 'true' && startsWith(github.ref, 'refs/heads/release') }}
|
||||
uses: ./.github/workflows/reusable-upload-recipe.yml
|
||||
secrets:
|
||||
clio_notify_token: ${{ secrets.CLIO_NOTIFY_TOKEN }}
|
||||
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||
remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||
|
||||
notify-clio:
|
||||
needs: upload-recipe
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Notify the Clio repository about the newly proposed release version, so
|
||||
# it can be checked for compatibility before the release is actually made.
|
||||
- name: Notify Clio
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.clio_notify_token }}
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
/repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
|
||||
-F "client_payload[ref]=${{ needs.upload-recipe.outputs.recipe_ref }}" \
|
||||
-F "client_payload[pr_url]=${PR_URL}"
|
||||
|
||||
passed:
|
||||
if: failure() || cancelled()
|
||||
needs:
|
||||
- build-test
|
||||
- check-levelization
|
||||
- check-rename
|
||||
- build-test
|
||||
- upload-recipe
|
||||
- notify-clio
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fail
|
||||
|
||||
4
.github/workflows/on-trigger.yml
vendored
4
.github/workflows/on-trigger.yml
vendored
@@ -86,5 +86,5 @@ jobs:
|
||||
if: ${{ github.repository_owner == 'XRPLF' && github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
|
||||
uses: ./.github/workflows/reusable-upload-recipe.yml
|
||||
secrets:
|
||||
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||
remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||
|
||||
48
.github/workflows/reusable-upload-recipe.yml
vendored
48
.github/workflows/reusable-upload-recipe.yml
vendored
@@ -1,33 +1,34 @@
|
||||
# This workflow exports the built libxrpl package to the Conan remote, and for
|
||||
# releases also notifies the Clio repository about the new version, so it can
|
||||
# check for compatibility.
|
||||
# This workflow exports the built libxrpl package to the Conan remote.
|
||||
name: Upload Conan recipe
|
||||
|
||||
# This workflow can only be triggered by other workflows.
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
conan_remote_name:
|
||||
remote_name:
|
||||
description: "The name of the Conan remote to use."
|
||||
required: false
|
||||
type: string
|
||||
default: xrplf
|
||||
conan_remote_url:
|
||||
remote_url:
|
||||
description: "The URL of the Conan endpoint to use."
|
||||
required: false
|
||||
type: string
|
||||
default: https://conan.ripplex.io
|
||||
|
||||
secrets:
|
||||
clio_notify_token:
|
||||
description: "The GitHub token to notify Clio about new versions."
|
||||
required: false
|
||||
conan_remote_username:
|
||||
remote_username:
|
||||
description: "The username for logging into the Conan remote."
|
||||
required: true
|
||||
conan_remote_password:
|
||||
remote_password:
|
||||
description: "The password for logging into the Conan remote."
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
recipe_ref:
|
||||
description: "The Conan recipe reference ('name/version') that was uploaded."
|
||||
value: ${{ jobs.upload.outputs.ref }}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-upload-recipe
|
||||
cancel-in-progress: true
|
||||
@@ -56,25 +57,10 @@ jobs:
|
||||
uses: ./.github/actions/upload-recipe
|
||||
id: upload
|
||||
with:
|
||||
conan_recipe_ref: ${{ steps.version.outputs.version }}
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
conan_remote_username: ${{ secrets.conan_remote_username }}
|
||||
conan_remote_password: ${{ secrets.conan_remote_password }}
|
||||
recipe_ref: ${{ steps.ref.outputs.ref }}
|
||||
remote_name: ${{ inputs.remote_name }}
|
||||
remote_url: ${{ inputs.remote_url }}
|
||||
remote_username: ${{ secrets.remote_username }}
|
||||
remote_password: ${{ secrets.remote_password }}
|
||||
outputs:
|
||||
conan_ref: ${{ steps.ref.outputs.ref }}
|
||||
|
||||
notify:
|
||||
needs: upload
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Notify Clio
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.clio_notify_token }}
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
/repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
|
||||
-F "client_payload[conan_ref]=${{ needs.upload.outputs.conan_ref }}" \
|
||||
-F "client_payload[pr_url]=${PR_URL}"
|
||||
ref: ${{ steps.ref.outputs.ref }}
|
||||
|
||||
4
.github/workflows/upload-conan-deps.yml
vendored
4
.github/workflows/upload-conan-deps.yml
vendored
@@ -86,8 +86,8 @@ jobs:
|
||||
- name: Setup Conan
|
||||
uses: ./.github/actions/setup-conan
|
||||
with:
|
||||
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
|
||||
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
|
||||
remote_name: ${{ env.CONAN_REMOTE_NAME }}
|
||||
remote_url: ${{ env.CONAN_REMOTE_URL }}
|
||||
|
||||
- name: Build dependencies
|
||||
uses: ./.github/actions/build-deps
|
||||
|
||||
Reference in New Issue
Block a user