Skip to content
Draft
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
5 changes: 3 additions & 2 deletions .github/config/conan/profiles/android-35-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 8 additions & 0 deletions .github/config/conan/profiles/macos-15-armv8-clang-14
Original file line number Diff line number Diff line change
Expand Up @@ -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++
8 changes: 8 additions & 0 deletions .github/config/conan/profiles/macos-26-armv8-clang-14
Original file line number Diff line number Diff line change
Expand Up @@ -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++
5 changes: 5 additions & 0 deletions .github/config/conan/profiles/ubuntu-24.04-clang-18
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions .github/config/conan/profiles/ubuntu-24.04-gcc-14
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions .github/config/conan/profiles/windows-2022-msvc-1940
Original file line number Diff line number Diff line change
Expand Up @@ -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
54 changes: 36 additions & 18 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: >
Expand Down Expand Up @@ -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: >
Expand Down
25 changes: 11 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "*"
30 changes: 24 additions & 6 deletions .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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: >
Expand Down
Loading