Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/config/conan/profiles/android-35-x86_64
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set android_home = os.getenv("ANDROID_HOME") %}
{% set ndk_version = "28.1.13356709" %}
{% set api_level = "35" %}
{% set arch = "x86_64" %}
{% set cc = {
"armv7": "armv7a-linux-androideabi" + api_level + "-clang",
"armv8": "aarch64-linux-android" + api_level + "-clang",
"x86": "i686-linux-android" + api_level + "-clang",
"x86_64": "x86_64-linux-android" + api_level + "-clang",
}[arch] %}

[settings]
os=Android
os.api_level={{api_level}}
arch={{arch}}
build_type=Release
compiler=clang
compiler.version=17
compiler.cppstd=20
compiler.libcxx=c++_shared

[conf]
tools.android:ndk_path={{android_home}}/ndk/{{ndk_version}}

[buildenv]
# Cross compile toolchain evn vars are required to build
# libffi, libgettext, libiconv, libxml2 and other autotools packages for Android
# https://github.com/conan-io/conan/issues/16493
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}}++
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ compiler.libcxx=libstdc++11
os=Linux

[conf]
tools.build:compiler_executables={'c': 'gcc-14', 'cpp': 'g++-14'}
tools.build:compiler_executables={'c': 'gcc-14', 'cpp': 'g++-14'}
85 changes: 55 additions & 30 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04, compiler: clang-18 }
- { os: ubuntu-24.04, compiler: gcc-14 }
- { os: macos-13, compiler: clang-14 }
- { os: macos-14, compiler: armv8-clang-14 }
- { os: windows-2022, compiler: msvc-1940 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: ubuntu-24.04-clang-18 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-gcc-14, host_profile: ubuntu-24.04-gcc-14 }
- { os: macos-13, build_profile: macos-13-clang-14, host_profile: macos-13-clang-14 }
- { os: macos-14, build_profile: macos-14-armv8-clang-14, host_profile: macos-14-armv8-clang-14 }
- { os: windows-2022, build_profile: windows-2022-msvc-1940, host_profile: windows-2022-msvc-1940 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: android-35-x86_64, ndk_version: 28.1.13356709 }
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -45,25 +46,33 @@ jobs:
- name: install python dependencies
run: pip install conan

- name: install NDK
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 odr https://artifactory.opendocument.app/artifactory/api/conan/conan
conan remote add conancenter https://center2.conan.io
- name: conan config
run: conan config install .github/config/${{ matrix.os }}-${{ matrix.compiler }}/conan
run: conan config install .github/config/conan
- name: conan install
run: conan install . --output-folder=build --build=missing
run: >
conan install .
--lockfile conan.lock
--profile:host '${{ matrix.host_profile }}'
--profile:build '${{ matrix.build_profile }}'

- name: cache
uses: actions/cache@v4
with:
path: |
~/.ccache
/Users/runner/Library/Caches/ccache
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.CCACHE_KEY_SUFFIX }}
key: ${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}
restore-keys: |
${{ matrix.os }}-${{ matrix.compiler }}-
${{ matrix.host_profile }}-

- name: cmake
if: runner.os != 'Windows'
Expand Down Expand Up @@ -99,7 +108,7 @@ jobs:
- name: upload binaries to github
uses: actions/upload-artifact@v4
with:
name: bin-${{ matrix.os }}-${{ matrix.compiler }}
name: bin-${{ matrix.host_profile }}
path: |
install
build/test/odr_test
Expand All @@ -109,7 +118,7 @@ jobs:
- name: Artifact .conan2/p dir
uses: actions/upload-artifact@v4
with:
name: conan2-${{ matrix.os }}-${{ matrix.compiler }}
name: conan2-${{ matrix.host_profile }}
path: ~/.conan2/p
if-no-files-found: error
compression-level: 0
Expand All @@ -121,7 +130,7 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04, compiler: clang-18 }
- { os: ubuntu-24.04, host_profile: ubuntu-24.04-clang-18 }
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -156,7 +165,7 @@ jobs:
- name: download binaries
uses: actions/download-artifact@v4
with:
name: bin-${{ matrix.os }}-${{ matrix.compiler }}
name: bin-${{ matrix.host_profile }}
path: cli

- name: Build and push
Expand All @@ -179,14 +188,14 @@ jobs:
matrix:
include:
# fails at the moment because of pdf2htmlex
#- { os: ubuntu-24.04, compiler: clang-18 }
#- { os: ubuntu-24.04, compiler: gcc-14 }
#- { os: macos-13, compiler: clang-14 }
- { os: macos-14, compiler: armv8-clang-14 }
#- { os: ubuntu-24.04, host_profile: ubuntu-24.04-clang-18 }
#- { os: ubuntu-24.04, host_profile: ubuntu-24.04-gcc-14 }
#- { os: macos-13, host_profile: macos-13-clang-14 }
- { os: macos-14, host_profile: macos-14-armv8-clang-14 }
# Windows test disabled because:
# Running main() from C:\Users\runneradmin\.conan2\p\b\gtestdd9407d368b89\b\src\googletest\src\gtest_main.cc
# [ 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
# - { os: windows-2022, compiler: msvc-1940 }
#- { os: windows-2022, host_profile: windows-2022-msvc-1940 }
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -211,13 +220,13 @@ jobs:
- name: download binaries
uses: actions/download-artifact@v4
with:
name: bin-${{ matrix.os }}-${{ matrix.compiler }}
name: bin-${{ matrix.host_profile }}
path: .

- name: Download .conan2/p dir
uses: actions/download-artifact@v4
with:
name: conan2-${{ matrix.os }}-${{ matrix.compiler }}
name: conan2-${{ matrix.host_profile }}
path: ~/.conan2/p

- name: fix artifact permissions
Expand Down Expand Up @@ -264,11 +273,12 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04, compiler: clang-18 }
- { os: ubuntu-24.04, compiler: gcc-14 }
- { os: macos-13, compiler: clang-14 }
- { os: macos-14, compiler: armv8-clang-14 }
- { os: windows-2022, compiler: msvc-1940 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: ubuntu-24.04-clang-18 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-gcc-14, host_profile: ubuntu-24.04-gcc-14 }
- { os: macos-13, build_profile: macos-13-clang-14, host_profile: macos-13-clang-14 }
- { os: macos-14, build_profile: macos-14-armv8-clang-14, host_profile: macos-14-armv8-clang-14 }
- { os: windows-2022, build_profile: windows-2022-msvc-1940, host_profile: windows-2022-msvc-1940 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: android-35-x86_64, ndk_version: 28.1.13356709 }
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -291,19 +301,34 @@ jobs:
- name: install python dependencies
run: pip install conan

- name: install NDK
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: conan config
run: conan config install .github/config/${{ matrix.os }}-${{ matrix.compiler }}/conan
run: conan config install .github/config/conan

- name: conan odrcore
run: conan export . --name odrcore --version 0.0.0

- name: conan install
run: conan install . --output-folder=build --build=missing
run: >
conan install .
--lockfile conan.lock
--profile:host '${{ matrix.host_profile }}'
--profile:build '${{ matrix.build_profile }}'
--output-folder=build
--build=missing

- name: conan downstream
run: conan install test/downstream --output-folder=test/downstream/build --build=missing
run: >
conan install test/downstream
--profile:host '${{ matrix.host_profile }}'
--profile:build '${{ matrix.build_profile }}'
--output-folder=test/downstream/build
--build=missing

- name: cmake
run: >
Expand All @@ -315,8 +340,8 @@ jobs:
run: cmake --build test/downstream/build --config Release

- name: run
if: runner.os != 'Windows'
if: matrix.build_profile == matrix.host_profile && (runner.os == 'Linux' || runner.os == 'macOS')
run: test/downstream/build/odr-test-downstream
- name: run
if: runner.os == 'Windows'
if: matrix.build_profile == matrix.host_profile && runner.os == 'Windows'
run: test/downstream/build/Release/odr-test-downstream.exe
10 changes: 7 additions & 3 deletions .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04, compiler: clang-18 }
- { os: ubuntu-24.04, build_profile: ubuntu-24.04-clang-18, host_profile: ubuntu-24.04-clang-18 }
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -30,9 +30,13 @@ jobs:
- name: conan remote
run: conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan
- name: conan config
run: conan config install .github/config/${{ matrix.os }}-${{ matrix.compiler }}/conan
run: conan config install .github/config/conan
- name: conan install
run: conan install . --output-folder=build --build=missing
run: >
conan install .
--lockfile conan.lock
--profile:host '${{ matrix.host_profile }}'
--profile:build '${{ matrix.build_profile }}'

- name: cmake
run: >
Expand Down