mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 15:05:53 +00:00
Switch Conan 1 commands to Conan 2 and fix credentials (#5655)
This change updates some incorrect Conan commands for Conan 2. As some flags do not exist in Conan 2, such as --settings build_type=[configuration], the commands have been adjusted accordingly. This change further uses the org-level variables and secrets rather than the repo-level ones.
This commit is contained in:
38
.github/actions/dependencies/action.yml
vendored
38
.github/actions/dependencies/action.yml
vendored
@@ -2,33 +2,25 @@ name: dependencies
|
|||||||
inputs:
|
inputs:
|
||||||
configuration:
|
configuration:
|
||||||
required: true
|
required: true
|
||||||
# An implicit input is the environment variable `build_dir`.
|
# Implicit inputs are the environment variables `build_dir`, CONAN_REMOTE_URL,
|
||||||
|
# CONAN_REMOTE_USERNAME, and CONAN_REMOTE_PASSWORD. The latter two are only
|
||||||
|
# used to upload newly built dependencies to the Conan remote.
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: add Conan remote
|
- name: add Conan remote
|
||||||
if: env.CONAN_URL != ''
|
if: ${{ env.CONAN_REMOTE_URL != '' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if conan remote list | grep -q 'xrplf'; then
|
echo "Adding Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL }}."
|
||||||
conan remote update --index 0 --url ${CONAN_URL} xrplf
|
conan remote add --index 0 --force xrplf ${{ env.CONAN_REMOTE_URL }}
|
||||||
echo "Updated Conan remote 'xrplf' to ${CONAN_URL}."
|
echo "Listing Conan remotes."
|
||||||
else
|
conan remote list
|
||||||
conan remote add --index 0 xrplf ${CONAN_URL}
|
|
||||||
echo "Added new Conan remote 'xrplf' at ${CONAN_URL}."
|
|
||||||
fi
|
|
||||||
- name: list missing binaries
|
|
||||||
id: binaries
|
|
||||||
shell: bash
|
|
||||||
# Print the list of dependencies that would need to be built locally.
|
|
||||||
# A non-empty list means we have "failed" to cache binaries remotely.
|
|
||||||
run: |
|
|
||||||
echo missing=$(conan info . --build missing --settings build_type=${{ inputs.configuration }} --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir ${build_dir}
|
mkdir -p ${{ env.build_dir }}
|
||||||
cd ${build_dir}
|
cd ${{ env.build_dir }}
|
||||||
conan install \
|
conan install \
|
||||||
--output-folder . \
|
--output-folder . \
|
||||||
--build missing \
|
--build missing \
|
||||||
@@ -37,10 +29,10 @@ runs:
|
|||||||
--settings:all build_type=${{ inputs.configuration }} \
|
--settings:all build_type=${{ inputs.configuration }} \
|
||||||
..
|
..
|
||||||
- name: upload dependencies
|
- name: upload dependencies
|
||||||
if: ${{ env.CONAN_URL != '' && env.CONAN_LOGIN_USERNAME_XRPLF != '' && env.CONAN_PASSWORD_XRPLF != '' && github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
|
if: ${{ env.CONAN_REMOTE_URL != '' && env.CONAN_REMOTE_USERNAME != '' && env.CONAN_REMOTE_PASSWORD != '' && github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Logging into Conan remote 'xrplf' at ${CONAN_URL}."
|
echo "Logging into Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL }}."
|
||||||
conan remote login xrplf "${{ env.CONAN_LOGIN_USERNAME_XRPLF }}" --password "${{ env.CONAN_PASSWORD_XRPLF }}"
|
conan remote login xrplf "${{ env.CONAN_REMOTE_USERNAME }}" --password "${{ env.CONAN_REMOTE_PASSWORD }}"
|
||||||
echo "Uploading dependencies for configuration '${{ inputs.configuration }}'."
|
echo "Uploading dependencies."
|
||||||
conan upload --all --confirm --remote xrplf . --settings build_type=${{ inputs.configuration }}
|
conan upload '*' --confirm --check --remote xrplf
|
||||||
|
|||||||
12
.github/workflows/libxrpl.yml
vendored
12
.github/workflows/libxrpl.yml
vendored
@@ -1,8 +1,8 @@
|
|||||||
name: Check libXRPL compatibility with Clio
|
name: Check libXRPL compatibility with Clio
|
||||||
env:
|
env:
|
||||||
CONAN_URL: https://conan.ripplex.io
|
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
@@ -46,10 +46,10 @@ jobs:
|
|||||||
- name: Add Conan remote
|
- name: Add Conan remote
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
echo "Adding Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL }}."
|
||||||
|
conan remote add xrplf ${{ env.CONAN_REMOTE_URL }} --insert 0 --force
|
||||||
|
echo "Listing Conan remotes."
|
||||||
conan remote list
|
conan remote list
|
||||||
conan remote remove xrplf || true
|
|
||||||
# Do not quote the URL. An empty string will be accepted (with a non-fatal warning), but a missing argument will not.
|
|
||||||
conan remote add xrplf ${{ env.CONAN_URL }} --insert 0
|
|
||||||
- name: Parse new version
|
- name: Parse new version
|
||||||
id: version
|
id: version
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
9
.github/workflows/macos.yml
vendored
9
.github/workflows/macos.yml
vendored
@@ -18,9 +18,12 @@ concurrency:
|
|||||||
# This part of Conan configuration is specific to this workflow only; we do not want
|
# This part of Conan configuration is specific to this workflow only; we do not want
|
||||||
# to pollute conan/profiles directory with settings which might not work for others
|
# to pollute conan/profiles directory with settings which might not work for others
|
||||||
env:
|
env:
|
||||||
CONAN_URL: https://conan.ripplex.io
|
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
CONAN_REMOTE_PASSWORD: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||||
|
# This part of the Conan configuration is specific to this workflow only; we
|
||||||
|
# do not want to pollute the 'conan/profiles' directory with settings that
|
||||||
|
# might not work for other workflows.
|
||||||
CONAN_GLOBAL_CONF: |
|
CONAN_GLOBAL_CONF: |
|
||||||
core.download:parallel={{os.cpu_count()}}
|
core.download:parallel={{os.cpu_count()}}
|
||||||
core.upload:parallel={{os.cpu_count()}}
|
core.upload:parallel={{os.cpu_count()}}
|
||||||
|
|||||||
11
.github/workflows/nix.yml
vendored
11
.github/workflows/nix.yml
vendored
@@ -16,12 +16,13 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
# This part of Conan configuration is specific to this workflow only; we do not want
|
|
||||||
# to pollute conan/profiles directory with settings which might not work for others
|
|
||||||
env:
|
env:
|
||||||
CONAN_URL: https://conan.ripplex.io
|
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
CONAN_REMOTE_PASSWORD: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||||
|
# This part of the Conan configuration is specific to this workflow only; we
|
||||||
|
# do not want to pollute the 'conan/profiles' directory with settings that
|
||||||
|
# might not work for other workflows.
|
||||||
CONAN_GLOBAL_CONF: |
|
CONAN_GLOBAL_CONF: |
|
||||||
core.download:parallel={{ os.cpu_count() }}
|
core.download:parallel={{ os.cpu_count() }}
|
||||||
core.upload:parallel={{ os.cpu_count() }}
|
core.upload:parallel={{ os.cpu_count() }}
|
||||||
|
|||||||
11
.github/workflows/windows.yml
vendored
11
.github/workflows/windows.yml
vendored
@@ -18,12 +18,13 @@ on:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
# This part of Conan configuration is specific to this workflow only; we do not want
|
|
||||||
# to pollute conan/profiles directory with settings which might not work for others
|
|
||||||
env:
|
env:
|
||||||
CONAN_URL: https://conan.ripplex.io
|
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
CONAN_REMOTE_PASSWORD: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||||
|
# This part of the Conan configuration is specific to this workflow only; we
|
||||||
|
# do not want to pollute the 'conan/profiles' directory with settings that
|
||||||
|
# might not work for other workflows.
|
||||||
CONAN_GLOBAL_CONF: |
|
CONAN_GLOBAL_CONF: |
|
||||||
core.download:parallel={{os.cpu_count()}}
|
core.download:parallel={{os.cpu_count()}}
|
||||||
core.upload:parallel={{os.cpu_count()}}
|
core.upload:parallel={{os.cpu_count()}}
|
||||||
|
|||||||
Reference in New Issue
Block a user