@@ -18,11 +18,12 @@ jobs:
1818 fail-fast : false
1919 matrix :
2020 include :
21- - { os: ubuntu-24.04, compiler: clang-18 }
22- - { os: ubuntu-24.04, compiler: gcc-14 }
23- - { os: macos-13, compiler: clang-14 }
24- - { os: macos-14, compiler: armv8-clang-14 }
25- - { os: windows-2022, compiler: msvc-1940 }
21+ - { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: ubuntu-24.04-clang-18 }
22+ - { os: ubuntu-24.04, build_profile: ubuntu-24.04-gcc-14, host_profile: ubuntu-24.04-gcc-14 }
23+ - { os: macos-13, build_profile: macos-13-clang-14, host_profile: macos-13-clang-14 }
24+ - { os: macos-14, build_profile: macos-14-armv8-clang-14, host_profile: macos-14-armv8-clang-14 }
25+ - { os: windows-2022, build_profile: windows-2022-msvc-1940, host_profile: windows-2022-msvc-1940 }
26+ - { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: android-35-x86_64, ndk_version: 28.1.13356709 }
2627 steps :
2728 - name : checkout
2829 uses : actions/checkout@v4
@@ -45,25 +46,33 @@ jobs:
4546 - name : install python dependencies
4647 run : pip install conan
4748
49+ - name : install NDK
50+ if : startsWith(matrix.host_profile, 'android')
51+ run : yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;${{ matrix.ndk_version }}'
52+
4853 - name : conan remote
4954 run : |
5055 conan remote remove "*"
5156 conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan
5257 conan remote add conancenter https://center2.conan.io
5358 - name : conan config
54- run : conan config install .github/config/${{ matrix.os }}-${{ matrix.compiler }}/ conan
59+ run : conan config install .github/config/conan
5560 - name : conan install
56- run : conan install . --output-folder=build --build=missing
61+ run : >
62+ conan install .
63+ --lockfile conan.lock
64+ --profile:host '${{ matrix.host_profile }}'
65+ --profile:build '${{ matrix.build_profile }}'
5766
5867 - name : cache
5968 uses : actions/cache@v4
6069 with :
6170 path : |
6271 ~/.ccache
6372 /Users/runner/Library/Caches/ccache
64- key : ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.CCACHE_KEY_SUFFIX }}
73+ key : ${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}
6574 restore-keys : |
66- ${{ matrix.os }}-${{ matrix.compiler }}-
75+ ${{ matrix.host_profile }}-
6776
6877 - name : cmake
6978 if : runner.os != 'Windows'
99108 - name : upload binaries to github
100109 uses : actions/upload-artifact@v4
101110 with :
102- name : bin-${{ matrix.os }}-${{ matrix.compiler }}
111+ name : bin-${{ matrix.host_profile }}
103112 path : |
104113 install
105114 build/test/odr_test
@@ -109,7 +118,7 @@ jobs:
109118 - name : Artifact .conan2/p dir
110119 uses : actions/upload-artifact@v4
111120 with :
112- name : conan2-${{ matrix.os }}-${{ matrix.compiler }}
121+ name : conan2-${{ matrix.host_profile }}
113122 path : ~/.conan2/p
114123 if-no-files-found : error
115124 compression-level : 0
@@ -121,7 +130,7 @@ jobs:
121130 fail-fast : false
122131 matrix :
123132 include :
124- - { os: ubuntu-24.04, compiler: clang-18 }
133+ - { os: ubuntu-24.04, host_profile: ubuntu-24.04- clang-18 }
125134 steps :
126135 - name : checkout
127136 uses : actions/checkout@v4
@@ -156,7 +165,7 @@ jobs:
156165 - name : download binaries
157166 uses : actions/download-artifact@v4
158167 with :
159- name : bin-${{ matrix.os }}-${{ matrix.compiler }}
168+ name : bin-${{ matrix.host_profile }}
160169 path : cli
161170
162171 - name : Build and push
@@ -179,14 +188,14 @@ jobs:
179188 matrix :
180189 include :
181190 # fails at the moment because of pdf2htmlex
182- # - { os: ubuntu-24.04, compiler: clang-18 }
183- # - { os: ubuntu-24.04, compiler: gcc-14 }
184- # - { os: macos-13, compiler: clang-14 }
185- - { os: macos-14, compiler: armv8-clang-14 }
191+ # - { os: ubuntu-24.04, host_profile: ubuntu-24.04- clang-18 }
192+ # - { os: ubuntu-24.04, host_profile: ubuntu-24.04- gcc-14 }
193+ # - { os: macos-13, host_profile: macos-13- clang-14 }
194+ - { os: macos-14, host_profile: macos-14- armv8-clang-14 }
186195 # Windows test disabled because:
187196 # Running main() from C:\Users\runneradmin\.conan2\p\b\gtestdd9407d368b89\b\src\googletest\src\gtest_main.cc
188197 # [ FATAL ] C:/Users/runneradmin/.conan2/p/gtest28fa6787e7f6e/p/include\gtest/internal/gtest-param-util.h(585):: Condition IsValidParamName(param_name) failed. Parameterized test name 'odr_private\docx\03_smpldap_docx' is invalid, in D:\a\OpenDocument.core\OpenDocument.core\test\src\html_output_test.cpp line 129
189- # - { os: windows-2022, compiler: msvc-1940 }
198+ # - { os: windows-2022, host_profile: windows-2022- msvc-1940 }
190199 steps :
191200 - name : checkout
192201 uses : actions/checkout@v4
@@ -211,13 +220,13 @@ jobs:
211220 - name : download binaries
212221 uses : actions/download-artifact@v4
213222 with :
214- name : bin-${{ matrix.os }}-${{ matrix.compiler }}
223+ name : bin-${{ matrix.host_profile }}
215224 path : .
216225
217226 - name : Download .conan2/p dir
218227 uses : actions/download-artifact@v4
219228 with :
220- name : conan2-${{ matrix.os }}-${{ matrix.compiler }}
229+ name : conan2-${{ matrix.host_profile }}
221230 path : ~/.conan2/p
222231
223232 - name : fix artifact permissions
@@ -264,11 +273,12 @@ jobs:
264273 fail-fast : false
265274 matrix :
266275 include :
267- - { os: ubuntu-24.04, compiler: clang-18 }
268- - { os: ubuntu-24.04, compiler: gcc-14 }
269- - { os: macos-13, compiler: clang-14 }
270- - { os: macos-14, compiler: armv8-clang-14 }
271- - { os: windows-2022, compiler: msvc-1940 }
276+ - { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: ubuntu-24.04-clang-18 }
277+ - { os: ubuntu-24.04, build_profile: ubuntu-24.04-gcc-14, host_profile: ubuntu-24.04-gcc-14 }
278+ - { os: macos-13, build_profile: macos-13-clang-14, host_profile: macos-13-clang-14 }
279+ - { os: macos-14, build_profile: macos-14-armv8-clang-14, host_profile: macos-14-armv8-clang-14 }
280+ - { os: windows-2022, build_profile: windows-2022-msvc-1940, host_profile: windows-2022-msvc-1940 }
281+ - { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: android-35-x86_64, ndk_version: 28.1.13356709 }
272282 steps :
273283 - name : checkout
274284 uses : actions/checkout@v4
@@ -291,19 +301,34 @@ jobs:
291301 - name : install python dependencies
292302 run : pip install conan
293303
304+ - name : install NDK
305+ if : startsWith(matrix.host_profile, 'android')
306+ run : yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;${{ matrix.ndk_version }}'
307+
294308 - name : conan remote
295309 run : conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan
296310 - name : conan config
297- run : conan config install .github/config/${{ matrix.os }}-${{ matrix.compiler }}/ conan
311+ run : conan config install .github/config/conan
298312
299313 - name : conan odrcore
300314 run : conan export . --name odrcore --version 0.0.0
301315
302316 - name : conan install
303- run : conan install . --output-folder=build --build=missing
317+ run : >
318+ conan install .
319+ --lockfile conan.lock
320+ --profile:host '${{ matrix.host_profile }}'
321+ --profile:build '${{ matrix.build_profile }}'
322+ --output-folder=build
323+ --build=missing
304324
305325 - name : conan downstream
306- run : conan install test/downstream --output-folder=test/downstream/build --build=missing
326+ run : >
327+ conan install test/downstream
328+ --profile:host '${{ matrix.host_profile }}'
329+ --profile:build '${{ matrix.build_profile }}'
330+ --output-folder=test/downstream/build
331+ --build=missing
307332
308333 - name : cmake
309334 run : >
@@ -315,8 +340,8 @@ jobs:
315340 run : cmake --build test/downstream/build --config Release
316341
317342 - name : run
318- if : runner.os != 'Windows'
343+ if : matrix.build_profile == matrix.host_profile && ( runner.os == 'Linux' || runner.os == 'macOS')
319344 run : test/downstream/build/odr-test-downstream
320345 - name : run
321- if : runner.os == 'Windows'
346+ if : matrix.build_profile == matrix.host_profile && runner.os == 'Windows'
322347 run : test/downstream/build/Release/odr-test-downstream.exe
0 commit comments