4747 conan_system_libs : bzip2 libiconv sqlite3 zlib
4848 - platform : android-armeabi-v7a
4949 os : ubuntu-latest
50- before_install : android.sh
50+ before_install : android-32 .sh
5151 conan_profile : android-32-ndk
5252 conan_system_libs : zlib
5353 - platform : android-arm64-v8a
@@ -67,42 +67,33 @@ jobs:
6767 run :
6868 shell : bash
6969 steps :
70- - name : Checkout VCMI
70+ - name : Checkout current
7171 uses : actions/checkout@v4
72- # TODO
73- with :
74- repository : ' kambala-decapitator/vcmi'
75- ref : ' conan-v2'
72+
73+ - name : Prepare CI
74+ run : |
75+ echo CUSTOM_PATCHES_PATH="$(pwd)/conan_patches" >> $GITHUB_ENV
76+ echo DEPS_FILE="dependencies-${{ matrix.platform }}.tgz" >> $GITHUB_ENV
77+ [ '${{ matrix.before_install }}' ] && 'ci/${{ matrix.before_install }}'
7678
7779 - uses : actions/setup-java@v4
7880 if : ${{ startsWith(matrix.platform, 'android') }}
7981 with :
8082 distribution : ' temurin'
8183 java-version : ' 17'
8284
83- - name : Prepare CI
84- if : ${{ matrix.before_install }}
85- run : source '${{github.workspace}}/CI/before_install/${{matrix.before_install}}'
86-
8785 - name : Setup Conan Client
8886 run : |
8987 pipx install conan
9088 conan profile detect
9189
9290 # CMake/Ninja version should be synced with runners
9391 # https://github.com/actions/runner-images/tree/main/images
94- # using CMake from Android SDK because some runners already have CMake v4
9592 - name : Prepare platform tools
9693 run : |
97- cmakeVersion=3.31.6
98-
99- # newPathFile=$(mktemp)
100- # echo "$ANDROID_HOME/cmake/$cmakeVersion/bin" | cat - "$GITHUB_PATH" > "$newPathFile"
101- # mv -f "$newPathFile" "$GITHUB_PATH"
102-
10394 echo "
10495 [platform_tool_requires]
105- cmake/$cmakeVersion
96+ cmake/3.31.6
10697 ninja/1.12.1
10798
10899 [conf]
@@ -121,17 +112,11 @@ jobs:
121112 conan create "$p" --user system
122113 done
123114
124- - name : Checkout current
125- uses : actions/checkout@v4
126- with :
127- path : deps
128-
129115 - name : Build recipes with our patches
130116 run : |
131117 cciRepo='conan-center-index'
132118 branchName='master'
133119 recipePathQt='recipes/qt'
134- custom_patches_path="$(pwd)/deps/conan_patches"
135120
136121 git clone "https://github.com/conan-io/$cciRepo.git" \
137122 --branch "$branchName" \
@@ -163,10 +148,10 @@ jobs:
163148
164149 conan create $packagePath \
165150 --version=$version \
166- --profile=../CI/conan /${{ matrix.conan_profile }} \
151+ --profile=../conan_profiles /${{ matrix.conan_profile }} \
167152 --build=missing \
168153 --test-folder= \
169- --core-conf core.sources.patch:extra_path=$custom_patches_path
154+ --core-conf core.sources.patch:extra_path=$CUSTOM_PATCHES_PATH
170155 done
171156
172157 # TODO: remove LuaJIT when https://github.com/conan-io/conan-center-index/pull/26577 is merged
@@ -175,7 +160,6 @@ jobs:
175160 cciForkRepo='cci-fork'
176161 branchName='vcmi'
177162 recipePathQt='recipes/qt'
178- custom_patches_path="$(pwd)/deps/conan_patches"
179163
180164 git clone "https://github.com/kambala-decapitator/conan-center-index.git" "$cciForkRepo" \
181165 --branch "$branchName" \
@@ -206,10 +190,10 @@ jobs:
206190 # Windows workaround for https://bugreports.qt.io/browse/QTBUG-84543
207191 PATH="/c/Strawberry/perl/bin:$PATH" conan create $packagePath \
208192 --version=$version \
209- --profile=../CI/conan /${{ matrix.conan_profile }} \
193+ --profile=../conan_profiles /${{ matrix.conan_profile }} \
210194 --build=missing \
211195 --test-folder= \
212- --core-conf core.sources.patch:extra_path=$custom_patches_path \
196+ --core-conf core.sources.patch:extra_path=$CUSTOM_PATCHES_PATH \
213197 ${{ startsWith(matrix.platform, 'android') && '-o "qt/*:android_sdk=$ANDROID_HOME"' || '' }}
214198 done
215199
@@ -218,8 +202,8 @@ jobs:
218202 conan install . \
219203 --output-folder=conan-generated \
220204 --build=missing \
221- --profile=CI/conan /${{ matrix.conan_profile }} \
222- ${{ matrix.conan_options }} || true
205+ --profile=conan_profiles /${{ matrix.conan_profile }} \
206+ ${{ matrix.conan_options }}
223207
224208 - name : Remove builds and source code
225209 run : conan cache clean
@@ -242,7 +226,7 @@ jobs:
242226 packageListFile='pkglist.json'
243227
244228 conan graph info . \
245- --profile=CI/conan /${{ matrix.conan_profile }} \
229+ --profile=conan_profiles /${{ matrix.conan_profile }} \
246230 --format=json \
247231 --build=never \
248232 --no-remote \
@@ -262,20 +246,20 @@ jobs:
262246 EOF" >> $GITHUB_ENV
263247
264248 - name : Create dependencies archive
265- run : conan cache save --file dependencies-${{matrix.platform}}.tgz "*:*"
249+ run : conan cache save --file "$DEPS_FILE" "*:*"
266250
267251 - name : Upload artifact
268252 uses : actions/upload-artifact@v4
269253 with :
270254 name : dependencies-${{ matrix.platform }}
271255 compression-level : 0
272- path : ' dependencies- ${{matrix.platform}}.tgz '
256+ path : ${{ env.DEPS_FILE }}
273257
274258 - name : Update release with artifact and text
275259 uses : softprops/action-gh-release@v2
276260 with :
277261 tag_name : ${{ needs.prepare.outputs.RELEASE_TAG }}
278- files : ' dependencies- ${{matrix.platform}}.tgz '
262+ files : ${{ env.DEPS_FILE }}
279263 append_body : true
280264 body : |
281265 <details><summary><b>${{ matrix.platform }}</b> packages</summary>
0 commit comments