Skip to content

Commit 74a0c31

Browse files
committed
Move configs to file so they can be reused across workflows
1 parent e8e8b5f commit 74a0c31

File tree

3 files changed

+88
-82
lines changed

3 files changed

+88
-82
lines changed

.github/workflows/debian.yml

Lines changed: 47 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,11 @@ env:
2222
CONAN_REMOTE_NAME: xrplf
2323
CONAN_LOGIN_USERNAME_XRPLF: ${{ secrets.CONAN_USERNAME }}
2424
CONAN_PASSWORD_XRPLF: ${{ secrets.CONAN_PASSWORD }}
25-
CONAN_GLOBAL_CONF: |
26-
core:non_interactive=True
27-
core.download:parallel={{ os.cpu_count() }}
28-
core.upload:parallel={{ os.cpu_count() }}
29-
core:default_build_profile=default
30-
core:default_profile=default
31-
tools.build:verbosity=verbose
32-
tools.compilation:verbosity=verbose
33-
CONAN_DEFAULT_OPTIONS: >-
34-
-o date/*:header_only=True
35-
-o grpc/*:shared=False
36-
-o grpc/*:secure=True
37-
-o libarchive/*:shared=False
38-
-o libarchive/*:with_acl=False
39-
-o libarchive/*:with_bzip2=False
40-
-o libarchive/*:with_cng=False
41-
-o libarchive/*:with_expat=False
42-
-o libarchive/*:with_iconv=False
43-
-o libarchive/*:with_libxml2=False
44-
-o libarchive/*:with_lz4=True
45-
-o libarchive/*:with_lzma=False
46-
-o libarchive/*:with_lzo=False
47-
-o libarchive/*:with_nettle=False
48-
-o libarchive/*:with_openssl=False
49-
-o libarchive/*:with_pcreposix=False
50-
-o libarchive/*:with_xattr=False
51-
-o libarchive/*:with_zlib=False
52-
-o lz4/*:shared=False
53-
-o openssl/*:shared=False
54-
-o protobuf/*:shared=False
55-
-o protobuf/*:with_zlib=True
56-
-o rocksdb/*:enable_sse=False
57-
-o rocksdb/*:lite=False
58-
-o rocksdb/*:shared=False
59-
-o rocksdb/*:use_rtti=True
60-
-o rocksdb/*:with_jemalloc=False
61-
-o rocksdb/*:with_lz4=True
62-
-o rocksdb/*:with_snappy=True
63-
-o snappy/*:shared=False
64-
-o soci/*:shared=False
65-
-o soci/*:with_sqlite3=True
66-
-o soci/*:with_boost=True
67-
-o xxhash/*:shared=False
6825

6926
jobs:
7027
build:
7128
strategy:
29+
max-parallel: 10
7230
matrix:
7331
architecture:
7432
- runner: ubuntu-24.04
@@ -86,53 +44,53 @@ jobs:
8644
- type: Debug
8745
# - type: Release
8846
package:
89-
- name: boost
90-
version: 1.86.0
91-
directory: all
47+
# - name: boost
48+
# version: 1.86.0
49+
# directory: all
9250
- name: date
9351
version: 3.0.4
9452
directory: all
95-
- name: doctest
96-
version: 2.4.11
97-
directory: 2.x.x
98-
- name: grpc
99-
version: 1.72.0
100-
directory: all
101-
- name: libarchive
102-
version: 3.8.1
103-
directory: all
104-
- name: lz4
105-
version: 1.10.0
106-
directory: all
107-
- name: nudb
108-
version: 2.0.9
109-
directory: all
110-
- name: openssl
111-
version: 1.1.1w
112-
directory: 1.x.x
113-
- name: protobuf
114-
version: 6.30.1
115-
directory: all
116-
- name: rocksdb
117-
version: 10.0.1
118-
directory: all
119-
- name: sqlite3
120-
version: 3.49.1
121-
directory: all
122-
- name: xxhash
123-
version: 0.8.3
124-
directory: all
125-
- name: zlib
126-
version: 1.3.1
127-
directory: all
53+
# - name: doctest
54+
# version: 2.4.11
55+
# directory: 2.x.x
56+
# - name: grpc
57+
# version: 1.72.0
58+
# directory: all
59+
# - name: libarchive
60+
# version: 3.8.1
61+
# directory: all
62+
# - name: lz4
63+
# version: 1.10.0
64+
# directory: all
65+
# - name: nudb
66+
# version: 2.0.9
67+
# directory: all
68+
# - name: openssl
69+
# version: 1.1.1w
70+
# directory: 1.x.x
71+
# - name: protobuf
72+
# version: 6.30.1
73+
# directory: all
74+
# - name: rocksdb
75+
# version: 10.0.1
76+
# directory: all
77+
# - name: sqlite3
78+
# version: 3.49.1
79+
# directory: all
80+
# - name: xxhash
81+
# version: 0.8.3
82+
# directory: all
83+
# - name: zlib
84+
# version: 1.3.1
85+
# directory: all
12886
runs-on: ${{ matrix.architecture.runner }}
12987
container: ${{ matrix.docker.image }}
13088
steps:
13189
- name: Checkout repository
13290
uses: actions/checkout@v4
13391
- name: Configure Conan
13492
run: |
135-
echo "${CONAN_GLOBAL_CONF}" >> $(conan config home)/global.conf
93+
cat config/global.conf >> $(conan config home)/global.conf
13694
conan config install profiles/ -tf $(conan config home)/profiles/
13795
- name: Add Conan remote
13896
run: |
@@ -155,10 +113,17 @@ jobs:
155113
--build=missing \
156114
--settings:all=build_type=${{ matrix.build.type }} \
157115
--update \
158-
${{ env.CONAN_DEFAULT_OPTIONS }}
159-
- name: Upload the recipe
116+
$(cat config/options.conf | tr '\n' ' ')
117+
- name: Upload the recipe (dry-run)
118+
if: ${{ github.ref_type == 'branch' && github.ref_name != github.event.repository.default_branch }}
160119
run: |
161120
conan upload '${{ matrix.package.name }}' \
162121
--remote ${{ env.CONAN_REMOTE_NAME }} \
163122
--confirm \
164123
--dry-run
124+
- name: Upload the recipe
125+
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
126+
run: |
127+
conan upload '${{ matrix.package.name }}' \
128+
--remote ${{ env.CONAN_REMOTE_NAME }} \
129+
--confirm

config/global.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
core:non_interactive=True
2+
core.download:parallel={{ os.cpu_count() }}
3+
core.upload:parallel={{ os.cpu_count() }}
4+
core:default_build_profile=default
5+
core:default_profile=default
6+
tools.build:verbosity=verbose
7+
tools.compilation:verbosity=verbose

config/options.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
-o date/*:header_only=True
2+
-o grpc/*:shared=False
3+
-o grpc/*:secure=True
4+
-o libarchive/*:shared=False
5+
-o libarchive/*:with_acl=False
6+
-o libarchive/*:with_bzip2=False
7+
-o libarchive/*:with_cng=False
8+
-o libarchive/*:with_expat=False
9+
-o libarchive/*:with_iconv=False
10+
-o libarchive/*:with_libxml2=False
11+
-o libarchive/*:with_lz4=True
12+
-o libarchive/*:with_lzma=False
13+
-o libarchive/*:with_lzo=False
14+
-o libarchive/*:with_nettle=False
15+
-o libarchive/*:with_openssl=False
16+
-o libarchive/*:with_pcreposix=False
17+
-o libarchive/*:with_xattr=False
18+
-o libarchive/*:with_zlib=False
19+
-o lz4/*:shared=False
20+
-o openssl/*:shared=False
21+
-o protobuf/*:shared=False
22+
-o protobuf/*:with_zlib=True
23+
-o rocksdb/*:enable_sse=False
24+
-o rocksdb/*:lite=False
25+
-o rocksdb/*:shared=False
26+
-o rocksdb/*:use_rtti=True
27+
-o rocksdb/*:with_jemalloc=False
28+
-o rocksdb/*:with_lz4=True
29+
-o rocksdb/*:with_snappy=True
30+
-o snappy/*:shared=False
31+
-o soci/*:shared=False
32+
-o soci/*:with_sqlite3=True
33+
-o soci/*:with_boost=True
34+
-o xxhash/*:shared=False

0 commit comments

Comments
 (0)