mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +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:
|
||||
configuration:
|
||||
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:
|
||||
using: composite
|
||||
steps:
|
||||
- name: add Conan remote
|
||||
if: env.CONAN_URL != ''
|
||||
if: ${{ env.CONAN_REMOTE_URL != '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
if conan remote list | grep -q 'xrplf'; then
|
||||
conan remote update --index 0 --url ${CONAN_URL} xrplf
|
||||
echo "Updated Conan remote 'xrplf' to ${CONAN_URL}."
|
||||
else
|
||||
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}
|
||||
echo "Adding Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL }}."
|
||||
conan remote add --index 0 --force xrplf ${{ env.CONAN_REMOTE_URL }}
|
||||
echo "Listing Conan remotes."
|
||||
conan remote list
|
||||
- name: install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ${build_dir}
|
||||
cd ${build_dir}
|
||||
mkdir -p ${{ env.build_dir }}
|
||||
cd ${{ env.build_dir }}
|
||||
conan install \
|
||||
--output-folder . \
|
||||
--build missing \
|
||||
@@ -37,10 +29,10 @@ runs:
|
||||
--settings:all build_type=${{ inputs.configuration }} \
|
||||
..
|
||||
- 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
|
||||
run: |
|
||||
echo "Logging into Conan remote 'xrplf' at ${CONAN_URL}."
|
||||
conan remote login xrplf "${{ env.CONAN_LOGIN_USERNAME_XRPLF }}" --password "${{ env.CONAN_PASSWORD_XRPLF }}"
|
||||
echo "Uploading dependencies for configuration '${{ inputs.configuration }}'."
|
||||
conan upload --all --confirm --remote xrplf . --settings build_type=${{ inputs.configuration }}
|
||||
echo "Logging into Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL }}."
|
||||
conan remote login xrplf "${{ env.CONAN_REMOTE_USERNAME }}" --password "${{ env.CONAN_REMOTE_PASSWORD }}"
|
||||
echo "Uploading dependencies."
|
||||
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
|
||||
env:
|
||||
CONAN_URL: https://conan.ripplex.io
|
||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
||||
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
@@ -46,10 +46,10 @@ jobs:
|
||||
- name: Add Conan remote
|
||||
shell: bash
|
||||
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 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
|
||||
id: version
|
||||
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
|
||||
# to pollute conan/profiles directory with settings which might not work for others
|
||||
env:
|
||||
CONAN_URL: https://conan.ripplex.io
|
||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
||||
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
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: |
|
||||
core.download: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 }}
|
||||
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:
|
||||
CONAN_URL: https://conan.ripplex.io
|
||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
||||
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
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: |
|
||||
core.download: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:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
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:
|
||||
CONAN_URL: https://conan.ripplex.io
|
||||
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
|
||||
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
|
||||
CONAN_REMOTE_URL: ${{ vars.CONAN_REMOTE_URL }}
|
||||
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
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: |
|
||||
core.download:parallel={{os.cpu_count()}}
|
||||
core.upload:parallel={{os.cpu_count()}}
|
||||
|
||||
Reference in New Issue
Block a user