diff --git a/.github/config/conan/profiles/android-35-x86_64 b/.github/config/conan/profiles/android-35-x86_64 index 3fecba7d..2f98cd06 100644 --- a/.github/config/conan/profiles/android-35-x86_64 +++ b/.github/config/conan/profiles/android-35-x86_64 @@ -21,6 +21,7 @@ compiler.libcxx=c++_shared [conf] tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} [buildenv] # Cross compile toolchain evn vars are required to build @@ -29,7 +30,7 @@ tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}} AR={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar AS={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as RANLIB={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib -CC={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} -CXX={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ +CC=ccache {{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}} +CXX=ccache {{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/{{cc}}++ LD={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/ld STRIP={{android_home}}/ndk/{{ndk_version}}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip diff --git a/.github/config/conan/profiles/macos-15-armv8-clang-14 b/.github/config/conan/profiles/macos-15-armv8-clang-14 index 2881663b..64b597da 100644 --- a/.github/config/conan/profiles/macos-15-armv8-clang-14 +++ b/.github/config/conan/profiles/macos-15-armv8-clang-14 @@ -6,3 +6,11 @@ compiler.version=14 compiler.cppstd=20 compiler.libcxx=libc++ os=Macos + +[conf] +tools.build:compiler_executables={'c': 'clang', 'cpp': 'clang++'} +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} + +[buildenv] +CC=ccache clang +CXX=ccache clang++ diff --git a/.github/config/conan/profiles/macos-26-armv8-clang-14 b/.github/config/conan/profiles/macos-26-armv8-clang-14 index 2881663b..64b597da 100644 --- a/.github/config/conan/profiles/macos-26-armv8-clang-14 +++ b/.github/config/conan/profiles/macos-26-armv8-clang-14 @@ -6,3 +6,11 @@ compiler.version=14 compiler.cppstd=20 compiler.libcxx=libc++ os=Macos + +[conf] +tools.build:compiler_executables={'c': 'clang', 'cpp': 'clang++'} +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} + +[buildenv] +CC=ccache clang +CXX=ccache clang++ diff --git a/.github/config/conan/profiles/ubuntu-24.04-clang-18 b/.github/config/conan/profiles/ubuntu-24.04-clang-18 index 1b4b601e..fafeefc8 100644 --- a/.github/config/conan/profiles/ubuntu-24.04-clang-18 +++ b/.github/config/conan/profiles/ubuntu-24.04-clang-18 @@ -9,3 +9,8 @@ os=Linux [conf] tools.build:compiler_executables={'c': 'clang-18', 'cpp': 'clang++-18'} +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} + +[buildenv] +CC=ccache clang-18 +CXX=ccache clang++-18 diff --git a/.github/config/conan/profiles/ubuntu-24.04-gcc-14 b/.github/config/conan/profiles/ubuntu-24.04-gcc-14 index b50862e6..b0191ede 100644 --- a/.github/config/conan/profiles/ubuntu-24.04-gcc-14 +++ b/.github/config/conan/profiles/ubuntu-24.04-gcc-14 @@ -9,3 +9,8 @@ os=Linux [conf] tools.build:compiler_executables={'c': 'gcc-14', 'cpp': 'g++-14'} +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} + +[buildenv] +CC=ccache g++-14 +CXX=ccache g++-14 diff --git a/.github/config/conan/profiles/windows-2022-msvc-1940 b/.github/config/conan/profiles/windows-2022-msvc-1940 index cc618806..4a74ff92 100644 --- a/.github/config/conan/profiles/windows-2022-msvc-1940 +++ b/.github/config/conan/profiles/windows-2022-msvc-1940 @@ -6,3 +6,11 @@ compiler.version=194 compiler.cppstd=20 compiler.runtime=dynamic os=Windows + +[conf] +tools.build:compiler_executables={'c': 'msvc', 'cpp': 'msvc'} +tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'} + +[buildenv] +CC=ccache msvc +CXX=ccache msvc diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 2efdd3b4..9f68e144 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -50,20 +50,15 @@ jobs: if: startsWith(matrix.host_profile, 'android') run: yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;${{ matrix.ndk_version }}' - - name: conan remote - run: | - conan remote remove "*" - conan remote add conancenter https://center2.conan.io - conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan + - name: fetch conan-odr-index + uses: actions/checkout@v4 + with: + repository: opendocument-app/conan-odr-index + path: conan-odr-index + - name: export conan-odr-index + run: python conan-odr-index/scripts/conan_export_all_packages.py - name: conan config run: conan config install .github/config/conan - - name: conan install - run: > - conan install . - --lockfile conan.lock - --profile:host '${{ matrix.host_profile }}' - --profile:build '${{ matrix.build_profile }}' - --build=missing - name: cache uses: actions/cache@v4 @@ -75,6 +70,14 @@ jobs: restore-keys: | ${{ matrix.host_profile }}- + - name: conan install + run: > + conan install . + --lockfile conan.lock + --profile:host '${{ matrix.host_profile }}' + --profile:build '${{ matrix.build_profile }}' + --build "*" + - name: cmake if: runner.os != 'Windows' run: > @@ -305,30 +308,45 @@ jobs: if: startsWith(matrix.host_profile, 'android') run: yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install 'ndk;${{ matrix.ndk_version }}' - - name: conan remote - run: conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan + - name: fetch conan-odr-index + uses: actions/checkout@v4 + with: + repository: opendocument-app/conan-odr-index + path: conan-odr-index + - name: export conan-odr-index + run: python conan-odr-index/scripts/conan_export_all_packages.py - name: conan config run: conan config install .github/config/conan - name: conan odrcore run: conan export . --name odrcore --version 0.0.0 + - name: cache + uses: actions/cache@v4 + with: + path: | + ~/.ccache + /Users/runner/Library/Caches/ccache + key: ${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }} + restore-keys: | + ${{ matrix.host_profile }}- + - name: conan install run: > conan install . --lockfile conan.lock --profile:host '${{ matrix.host_profile }}' --profile:build '${{ matrix.build_profile }}' - --output-folder=build - --build=missing + --output-folder build + --build "*" - name: conan downstream run: > conan install test/downstream --profile:host '${{ matrix.host_profile }}' --profile:build '${{ matrix.build_profile }}' - --output-folder=test/downstream/build - --build=missing + --output-folder test/downstream/build + --build "*" - name: cmake run: > diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f1050712..d93bf529 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,33 +26,30 @@ jobs: - name: get version run: echo "VERSION=${GITHUB_REF_NAME:1}" >> $GITHUB_ENV - - name: conan remote - run: | - conan remote remove "*" - conan remote add conancenter https://center2.conan.io - conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan + - name: fetch conan-odr-index + uses: actions/checkout@v4 + with: + repository: opendocument-app/conan-odr-index + path: conan-odr-index + - name: export conan-odr-index + run: python conan-odr-index/scripts/conan_export_all_packages.py - name: conan config run: conan config install .github/config/conan + - name: conan install run: > conan install . --lockfile conan.lock --profile:host '${{ matrix.host_profile }}' --profile:build '${{ matrix.build_profile }}' - --build=missing + --build "*" - name: create conan package run: > conan create . - --lockfile conan.lock + --lockfile=conan.lock --profile:host '${{ matrix.host_profile }}' --profile:build '${{ matrix.build_profile }}' --name odrcore --version ${VERSION} - --build missing - - - name: conan login - run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} - - - name: upload to conan repo - run: conan upload "*" --remote odr --only-recipe --confirm + --build "*" diff --git a/.github/workflows/tidy.yml b/.github/workflows/tidy.yml index 9ebfda1c..bb478b99 100644 --- a/.github/workflows/tidy.yml +++ b/.github/workflows/tidy.yml @@ -6,6 +6,11 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +env: + CCACHE_DIR: ${{ github.workspace }}/ccache + CCACHE_MAXSIZE: 500M + CCACHE_KEY_SUFFIX: r22 + jobs: build: runs-on: ${{ matrix.os }} @@ -27,20 +32,33 @@ jobs: - name: install python dependencies run: pip install --upgrade pip conan - - name: conan remote - run: | - conan remote remove "*" - conan remote add conancenter https://center2.conan.io - conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan + - name: fetch conan-odr-index + uses: actions/checkout@v4 + with: + repository: opendocument-app/conan-odr-index + path: conan-odr-index + - name: export conan-odr-index + run: python conan-odr-index/scripts/conan_export_all_packages.py - name: conan config run: conan config install .github/config/conan + + - name: cache + uses: actions/cache@v4 + with: + path: | + ~/.ccache + /Users/runner/Library/Caches/ccache + key: ${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }} + restore-keys: | + ${{ matrix.host_profile }}- + - name: conan install run: > conan install . --lockfile conan.lock --profile:host '${{ matrix.host_profile }}' --profile:build '${{ matrix.build_profile }}' - --build=missing + --build "*" - name: cmake run: > diff --git a/conan.lock b/conan.lock index b5e5e6de..2b982132 100644 --- a/conan.lock +++ b/conan.lock @@ -3,17 +3,17 @@ "requires": [ "zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4%1760955092.069", "zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1765284699.337", - "xz_utils/5.8.1#0c67d0683aca2f1ca69a17730a65a1e7%1764347087.521", - "wvware/1.2.9-odr#2d8e0b63ad3ece786e8e70cb5c550f5f%1766349558.318423", + "xz_utils/5.8.2#79a8ec4932f0b3bad1293f78d5b90447%1773450120.286", + "wvware/1.2.9-odr#2d8e0b63ad3ece786e8e70cb5c550f5f%1766352522.558", "vincentlaucsb-csv-parser/2.3.0#ac67e368e82c9e3da4a663c35e3a1b2f%1718528275.177", "util-linux-libuuid/2.41.2#ee8e33ba15c17c0140643e0bd93c0b6f%1765881086.29", - "utfcpp/4.0.4#cd6efc5d62de4e9ee0b5f3abd0df37a9%1722968964.685", + "utfcpp/4.0.4#199ad4051968b14d27cb937173bcf42a%1773905534.969", "uchardet/0.0.8#6ab25e452021fcdb560f4e37f4a27bc1%1759735438.978", "pugixml/1.14#c6afdcf73d71858303d8260b0d76ff91%1696206310.014", - "poppler-data/0.4.12-odr#06cdb12e4cab52261a5eb6c7d7dad273%1766349558.167614", - "poppler/24.08.0-odr#5150a6889acc1c8c9176d857c12fa3c8%1766349558.019082", + "poppler-data/0.4.12-odr#06cdb12e4cab52261a5eb6c7d7dad273%1764497608.501", + "poppler/24.08.0-odr#5150a6889acc1c8c9176d857c12fa3c8%1766352521.627", "pixman/0.46.2#88b157b4faa6474a6028c2ba2a987924%1752742515.414", - "pdf2htmlex/0.18.8.rc1-odr-git-eb5d291#fadb1d15d841bf6c75e3bc76bde81777%1766349557.868725", + "pdf2htmlex/0.18.8.rc1-odr-git-eb5d291#fadb1d15d841bf6c75e3bc76bde81777%1766352519.27", "pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1743524593.693", "openjpeg/2.5.4#372fbc2b4348d45ab0c0a62a8475dc2f%1760446899.685", "nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d%1701220705.259", @@ -21,41 +21,42 @@ "lzo/2.10#f00b10acc508cea70645727d970a23e1%1759909644.842", "libxml2/2.12.7#1c4d20b7ab8b618ce699733723ba4df6%1721306327.767", "libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1717655459.344", - "libpng/1.6.53#a55f084366cd7b81cfce80327507913e%1765191393.267", + "libpng/1.6.55#f32362d4db3c562271d907c99be24091%1770802173.684", "libmagic/5.45#791d5bad38d33272bb120994a198b1ac%1727273086.09", "libjpeg/9f#8edfe2699565c80c825d0256002504ff%1723665907.087", "libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1751451666.321", - "libgsf/1.14.52#7b7b45fff714f0441d8837e7b14b8b9a%1766349557.4201689", + "libgsf/1.14.52#7b7b45fff714f0441d8837e7b14b8b9a%1766352516.733", "libgettext/0.22#b09eea019e19b9b9c46d8f1da7d75444%1765809130.834", "libffi/3.4.8#a045c00fb26779635e3bed40e80c5254%1753360042.396", "libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1741781951.327", "lcms/2.17#3feb06eea368c52c82f50107cd7694cd%1753693316.094", "gtest/1.14.0#f8f0757a574a8dd747d16af62d6eb1b7%1743410807.169", - "glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1766349557.268547", - "giflib/5.2.2#3923fc0f7ffec2f0bdbdee9b548f9248%1731663927.701", + "glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1766352509.109", + "giflib/5.2.2#b445ec67bae61a96ddf0fa5614afde18%1773315754.794", "freetype/2.14.1#40f1e4af5db7d8155f9ecabd09973280%1762374429.281", - "fontforge/20240423-git#af7f643fc24bfd3661e97e8adf7c5a72%1766349557.1175628", - "fontconfig/2.15.0-odr#5681bcb942193569ee95215b93ed9fb0%1766349556.9683158", - "expat/2.7.3#f529802a90f0758a01f498a18f8c657b%1759399780.465", + "fontforge/20240423-git#af7f643fc24bfd3661e97e8adf7c5a72%1766352508.159", + "fontconfig/2.15.0-odr#5681bcb942193569ee95215b93ed9fb0%1766352507.462", + "expat/2.7.5#89bbde1770876a19bb8620b9808941cc%1773806275.408", "cryptopp/8.9.0#7a51e0038756b21bc3a6b82d681d5906%1758206597.119", "cpp-httplib/0.16.3#7aa89fbb81ffd19539a49fc132502966%1748426320.106", - "cairo/1.18.0-odr#e2979af10b4da6ece999e32d272ffabc%1766349556.814425", + "cairo/1.18.0-odr#e2979af10b4da6ece999e32d272ffabc%1766352506.497", "bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1762886692.465", "brotli/1.1.0#3f631ef77008f7b5eb388780116371a3%1764862343.045", "boost/1.90.0#d5e8defe7355494953be18524a7f135b%1765955095.179", - "argon2/20190702-odr#965901884bc82ec8a7c0a1305d42c127%1766349556.660966" + "argon2/20190702-odr#965901884bc82ec8a7c0a1305d42c127%1764497584.637" ], "build_requires": [ "zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4%1760955092.069", "zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1765284699.337", - "xz_utils/5.8.1#0c67d0683aca2f1ca69a17730a65a1e7%1764347087.521", + "xz_utils/5.8.2#79a8ec4932f0b3bad1293f78d5b90447%1773450120.286", "pkgconf/2.5.1#93c2051284cba1279494a43a4fcfeae2%1757684701.089", "pkgconf/2.2.0#4ac315b50ef734072b00ff3aacbf52bf%1755505628.021", "pkgconf/2.1.0#21f96520faf7660b99f872e956d2ac13%1755505630.82", "pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1743524593.693", "ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb%1764096931.974", + "meson/1.10.1#426d7d29e3e5f7285cb8398d84546734%1772032339.966", "meson/1.9.1#abbc783cd297bedce14581b4aec060b8%1758626166.349", - "m4/1.4.19#b38ced39a01e31fef5435bc634461fd2%1700758725.451", + "m4/1.4.19#1f9bd25d2bd53f49ad509caa467f57b9%1770982506.688", "libtool/2.4.7#14e7739cc128bc1623d2ed318008e47e%1755679003.847", "libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1717655459.344", "libmagic/5.45#791d5bad38d33272bb120994a198b1ac%1727273086.09", @@ -66,10 +67,11 @@ "gtk-doc-stub/cci.20181216#09072d684ce1458596b44a30a747494c%1687277608.37", "gperf/3.1#a7afdf8f7cccdc2dcd4d962370c33d4f%1755780571.156", "gnu-config/cci.20210814#466e9d4d7779e1c142443f7ea44b4284%1762363589.329", - "glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1766349557.268547", + "glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1766352509.109", "gettext/0.26#28c867efd4914f03c6c05da08a23c35b%1765299118.633", "flex/2.6.4#efa781fc5088b47c895bd4eef6911f2e%1761560242.855", - "cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76%1763665505.054", + "cmake/4.3.0#b939a42e98f593fb34d3a8c5cc860359%1773780142.26", + "cmake/3.31.11#f325c933f618a1fcebc1e1c0babfd1ba%1769622857.944", "bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1762886692.465", "automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f%1755524470.56", "autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86"