@@ -2,33 +2,25 @@ name: dependencies
2
2
inputs :
3
3
configuration :
4
4
required : true
5
- # An implicit input is the environment variable `build_dir`.
5
+ # Implicit inputs are the environment variables `build_dir`, CONAN_REMOTE_URL,
6
+ # CONAN_REMOTE_USERNAME, and CONAN_REMOTE_PASSWORD. The latter two are only
7
+ # used to upload newly built dependencies to the Conan remote.
6
8
runs :
7
9
using : composite
8
10
steps :
9
11
- name : add Conan remote
10
- if : env.CONAN_URL != ''
12
+ if : ${{ env.CONAN_REMOTE_URL != '' }}
11
13
shell : bash
12
14
run : |
13
- if conan remote list | grep -q 'xrplf'; then
14
- conan remote update --index 0 --url ${CONAN_URL} xrplf
15
- echo "Updated Conan remote 'xrplf' to ${CONAN_URL}."
16
- else
17
- conan remote add --index 0 xrplf ${CONAN_URL}
18
- echo "Added new Conan remote 'xrplf' at ${CONAN_URL}."
19
- fi
20
- - name : list missing binaries
21
- id : binaries
22
- shell : bash
23
- # Print the list of dependencies that would need to be built locally.
24
- # A non-empty list means we have "failed" to cache binaries remotely.
25
- run : |
26
- echo missing=$(conan info . --build missing --settings build_type=${{ inputs.configuration }} --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
15
+ echo "Adding Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL }}."
16
+ conan remote add --index 0 --force xrplf ${{ env.CONAN_REMOTE_URL }}
17
+ echo "Listing Conan remotes."
18
+ conan remote list
27
19
- name : install dependencies
28
20
shell : bash
29
21
run : |
30
- mkdir ${ build_dir}
31
- cd ${build_dir}
22
+ mkdir -p ${{ env. build_dir } }
23
+ cd ${{ env. build_dir } }
32
24
conan install \
33
25
--output-folder . \
34
26
--build missing \
@@ -37,10 +29,10 @@ runs:
37
29
--settings:all build_type=${{ inputs.configuration }} \
38
30
..
39
31
- 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 }}
32
+ 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 }}
41
33
shell : bash
42
34
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 }}
35
+ echo "Logging into Conan remote 'xrplf' at ${{ env.CONAN_REMOTE_URL } }."
36
+ conan remote login xrplf "${{ env.CONAN_REMOTE_USERNAME }}" --password "${{ env.CONAN_REMOTE_PASSWORD }}"
37
+ echo "Uploading dependencies."
38
+ conan upload '*' --confirm --check --remote xrplf
0 commit comments