Skip to content

Commit 89bdc32

Browse files
authored
Merge branch 'main' into add-tmpfile-android-hack
2 parents f865950 + c30ba74 commit 89bdc32

10 files changed

Lines changed: 176 additions & 35 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{% set android_home = os.getenv("ANDROID_HOME") %}
2+
{% set ndk_version = "28.1.13356709" %}
3+
{% set api_level = "35" %}
4+
{% set arch = "x86_64" %}
5+
{% set cc = {
6+
"armv7": "armv7a-linux-androideabi" + api_level + "-clang",
7+
"armv8": "aarch64-linux-android" + api_level + "-clang",
8+
"x86": "i686-linux-android" + api_level + "-clang",
9+
"x86_64": "x86_64-linux-android" + api_level + "-clang",
10+
}[arch] %}
11+
12+
[settings]
13+
os=Android
14+
os.api_level={{api_level}}
15+
arch={{arch}}
16+
build_type=Release
17+
compiler=clang
18+
compiler.version=17
19+
compiler.cppstd=20
20+
compiler.libcxx=c++_shared
21+
22+
[conf]
23+
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}
24+
25+
[buildenv]
26+
# Cross compile toolchain evn vars are required to build
27+
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
28+
# https://github.com/conan-io/conan/issues/16493
29+
AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
30+
AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
31+
RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
32+
CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}
33+
CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++
34+
LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
35+
STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip
File renamed without changes.

.github/config/macos-14-armv8-clang-14/conan/profiles/default renamed to .github/config/conan/profiles/macos-14-armv8-clang-14

File renamed without changes.

.github/config/ubuntu-24.04-clang-18/conan/profiles/default renamed to .github/config/conan/profiles/ubuntu-24.04-clang-18

File renamed without changes.

.github/config/ubuntu-24.04-gcc-14/conan/profiles/default renamed to .github/config/conan/profiles/ubuntu-24.04-gcc-14

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ compiler.libcxx=libstdc++11
88
os=Linux
99

1010
[conf]
11-
tools.build:compiler_executables={'c': 'gcc-14', 'cpp': 'g++-14'}
11+
tools.build:compiler_executables={'c': 'gcc-14', 'cpp': 'g++-14'}

.github/config/windows-2022-msvc-1940/conan/profiles/default renamed to .github/config/conan/profiles/windows-2022-msvc-1940

File renamed without changes.

.github/workflows/build_test.yml

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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'
@@ -99,7 +108,7 @@ jobs:
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

.github/workflows/tidy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
- { os: ubuntu-24.04, compiler: clang-18 }
16+
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: ubuntu-24.04-clang-18 }
1717
steps:
1818
- name: checkout
1919
uses: actions/checkout@v4
@@ -30,9 +30,13 @@ jobs:
3030
- name: conan remote
3131
run: conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan
3232
- name: conan config
33-
run: conan config install .github/config/${{ matrix.os }}-${{ matrix.compiler }}/conan
33+
run: conan config install .github/config/conan
3434
- name: conan install
35-
run: conan install . --output-folder=build --build=missing
35+
run: >
36+
conan install .
37+
--lockfile conan.lock
38+
--profile:host '${{ matrix.host_profile }}'
39+
--profile:build '${{ matrix.build_profile }}'
3640
3741
- name: cmake
3842
run: >

conan.lock

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"version": "0.5",
3+
"requires": [
4+
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1750000238.944",
5+
"wvware/1.2.9-odr#6bd4e48d585db93e63d8af1f62aae202%1751998476.120598",
6+
"vincentlaucsb-csv-parser/2.3.0#ac67e368e82c9e3da4a663c35e3a1b2f%1750000219.109",
7+
"util-linux-libuuid/2.39.2#637bd312b6310c18190469fae4e1d480%1750001552.07",
8+
"utfcpp/4.0.4#cd6efc5d62de4e9ee0b5f3abd0df37a9%1750000218.416",
9+
"uchardet/0.0.8#a9026ce72d955751db2dbda62c83c430%1750000217.668",
10+
"tmpfile/3.0.6#55320ca8b4f0ce73669da77e247497d5%1751998475.967653",
11+
"pugixml/1.14#c6afdcf73d71858303d8260b0d76ff91%1750000216.958",
12+
"poppler-data/0.4.12-odr#06cdb12e4cab52261a5eb6c7d7dad273%1751998478.131423",
13+
"poppler/24.08.0-odr#2929132c6c3c67155c6c8f050c923916%1753613717.594275",
14+
"pixman/0.43.4#0dcdf859941e32fcc7bfb73ea1946a7f%1750001639.97",
15+
"pdf2htmlex/0.18.8.rc1-odr-git-eb5d291#01227c46d8bced149c1e2dd031406e57%1751998477.185751",
16+
"pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1750000236.015",
17+
"openjpeg/2.5.2#6f7b733e151d1bbf5ed05cbabb846828%1750000300.976",
18+
"nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d%1750000211.763",
19+
"miniz/3.0.2#bfbce07c6654293cce27ee24129d2df7%1750000211.025",
20+
"lzo/2.10#5725914235423c771cb1c6b607109b45%1750001638.618",
21+
"libxml2/2.12.7#1c4d20b7ab8b618ce699733723ba4df6%1750000648.779",
22+
"libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1750000231.957",
23+
"libpng/1.6.48#dd0fc04a42b9a23bce065545a81d4847%1750000297.819",
24+
"libjpeg/9f#8edfe2699565c80c825d0256002504ff%1750000296.672",
25+
"libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1751481424.612",
26+
"libgsf/1.14.52#9b22c41267004c80ba5cde5d01e23a24%1751998477.691299",
27+
"libgettext/0.22#35d2811b2dd27a98f69e4daa86ca2000%1750000333.394",
28+
"libffi/3.4.8#06926dca35bcf8e321fcc24def952cde%1751053298.477",
29+
"libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1750000230.285",
30+
"lcms/2.16#fb083506ff40fd950c9e5c39df8bed54%1750000294.657",
31+
"gtest/1.14.0#f8f0757a574a8dd747d16af62d6eb1b7%1750000208.716",
32+
"glib/2.81.0-odr#ddf445d5af468f972978af93c44d26e1%1751998476.572931",
33+
"giflib/5.2.2#3923fc0f7ffec2f0bdbdee9b548f9248%1750000907.58",
34+
"freetype/2.13.2#5d2563803c8558d4ef47271a82c73d20%1750000292.435",
35+
"fontforge/20240423-git#8ae4b098d2372ee160575ed2aba4aa5c%1751998480.321554",
36+
"fontconfig/2.15.0-odr#2febbef44ca469204c8ff38cfd21db59%1751998477.841393",
37+
"expat/2.7.1#b0b67ba910c5147271b444139ca06953%1750000778.374",
38+
"cryptopp/8.9.0#fe3de584c28c0ecc938a1671e3f1bd72%1750000207.862",
39+
"cpp-httplib/0.16.3#7aa89fbb81ffd19539a49fc132502966%1751053293.71",
40+
"cairo/1.18.0-odr#c1d0ad14a91ad6d161e756d54277ac13%1751998477.353945",
41+
"bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5%1750000224.837",
42+
"brotli/1.1.0#406ce8f1c997f4ef7852fa01ff85ef9f%1750000288.894",
43+
"boost/1.86.0#1a9d6c7521c03c76356cfec29a82acb2%1751053276.594",
44+
"argon2/20190702-odr#965901884bc82ec8a7c0a1305d42c127%1751998476.420514"
45+
],
46+
"build_requires": [
47+
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1750000238.944",
48+
"pkgconf/2.2.0#6462942a22803086372db44689ba825f%1750000238.024",
49+
"pkgconf/2.1.0#27f44583701117b571307cf5b5fe5605%1750000302.359",
50+
"pkgconf/2.0.3#f996677e96e61e6552d85e83756c328b%1750000237.199",
51+
"pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1750000236.015",
52+
"ninja/1.13.0#53ff096207a5599ced46a633271b3cef%1751481429.955",
53+
"meson/1.4.0#2262941cc8fbb0099dd0c196ca2a6c01%1750000234.33",
54+
"meson/1.3.2#26ce8a76a36cc275cdfee1d757bc6561%1750000299.857",
55+
"meson/1.2.2#21b73818ba96d9eea465b310b5bbc993%1750000233.916",
56+
"meson/1.2.1#f2b0c7763308df8e33172744dace8845%1750000298.922",
57+
"m4/1.4.19#b38ced39a01e31fef5435bc634461fd2%1750000233.041",
58+
"libtool/2.4.7#a182d7ce8d4c346a19dbd4a5d532ef68%1750000647.395",
59+
"libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1750000231.957",
60+
"libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1751481424.612",
61+
"libgettext/0.22#35d2811b2dd27a98f69e4daa86ca2000%1750000333.394",
62+
"libffi/3.4.8#06926dca35bcf8e321fcc24def952cde%1751053298.477",
63+
"libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1750000230.285",
64+
"gtk-doc-stub/cci.20181216#09072d684ce1458596b44a30a747494c%1750000641.043",
65+
"gperf/3.1#1d622ad9717e9348ed3685c9994ad0b9%1750000781.272",
66+
"gnu-config/cci.20210814#69fde734e1a46fd1655b4af46ab40945%1751053297.019",
67+
"glib/2.81.0-odr#ddf445d5af468f972978af93c44d26e1%1751998476.572931",
68+
"gettext/0.22.5#a1f31cc77dee0345699745ef39686dd0%1751053295.554",
69+
"flex/2.6.4#e35bc44b3fcbcd661e0af0dc5b5b1ad4%1750000226.182",
70+
"cmake/3.31.8#dd6e07c418afc4b30cb1c21584dccc49%1751053281.227",
71+
"bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5%1750000224.837",
72+
"automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1750000337.039",
73+
"autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1751053275.066"
74+
],
75+
"python_requires": [],
76+
"config_requires": []
77+
}

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def requirements(self):
5555
if self.options.get_safe("with_wvWare", False):
5656
self.requires("wvware/1.2.9-odr")
5757
self.requires("cpp-httplib/0.16.3")
58-
self.requires("argon2/20190702")
58+
self.requires("argon2/20190702-odr")
5959

6060
if self.options.get_safe("with_customTmpfile", False):
6161
self.requires("tmpfile/3.0.6")

0 commit comments

Comments
 (0)