Skip to content

Commit 9918916

Browse files
authored
Upload Conan dependencies upon merge into develop (#5654)
This change uploads built Conan dependencies to the Conan remote upon merge into the develop branch. At the moment, whenever Conan dependencies change, we need to remember to manually push them to our Conan remote, so they are cached for future reuse. If we forget to do so, these changed dependencies need to be rebuilt over and over again, which can take a long time.
1 parent 69314e6 commit 9918916

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.github/actions/dependencies/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
echo "Updated Conan remote 'xrplf' to ${CONAN_URL}."
1616
else
1717
conan remote add --index 0 xrplf ${CONAN_URL}
18-
echo "Added new conan remote 'xrplf' at ${CONAN_URL}."
18+
echo "Added new Conan remote 'xrplf' at ${CONAN_URL}."
1919
fi
2020
- name: list missing binaries
2121
id: binaries
@@ -36,3 +36,11 @@ runs:
3636
--options:host "&:xrpld=True" \
3737
--settings:all build_type=${{ inputs.configuration }} \
3838
..
39+
- name: upload dependencies
40+
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 }}
41+
shell: bash
42+
run: |
43+
echo "Logging into Conan remote 'xrplf' at ${CONAN_URL}."
44+
conan remote login xrplf "${{ env.CONAN_LOGIN_USERNAME_XRPLF }}" --password "${{ env.CONAN_PASSWORD_XRPLF }}"
45+
echo "Uploading dependencies for configuration '${{ inputs.configuration }}'."
46+
conan upload --all --confirm --remote xrplf . --settings build_type=${{ inputs.configuration }}

.github/workflows/macos.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ concurrency:
1919
# to pollute conan/profiles directory with settings which might not work for others
2020
env:
2121
CONAN_URL: https://conan.ripplex.io
22+
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
23+
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
2224
CONAN_GLOBAL_CONF: |
2325
core.download:parallel={{os.cpu_count()}}
2426
core.upload:parallel={{os.cpu_count()}}

.github/workflows/nix.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ concurrency:
2020
# to pollute conan/profiles directory with settings which might not work for others
2121
env:
2222
CONAN_URL: https://conan.ripplex.io
23+
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
24+
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
2325
CONAN_GLOBAL_CONF: |
2426
core.download:parallel={{ os.cpu_count() }}
2527
core.upload:parallel={{ os.cpu_count() }}

.github/workflows/windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ concurrency:
2222
# to pollute conan/profiles directory with settings which might not work for others
2323
env:
2424
CONAN_URL: https://conan.ripplex.io
25+
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
26+
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_TOKEN }}
2527
CONAN_GLOBAL_CONF: |
2628
core.download:parallel={{os.cpu_count()}}
2729
core.upload:parallel={{os.cpu_count()}}

0 commit comments

Comments
 (0)