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
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 gcc-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
97 changes: 64 additions & 33 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ concurrency:
cancel-in-progress: true

env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 500M
CCACHE_KEY_SUFFIX: r22
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 1G
CCACHE_KEY_SUFFIX: r1
CONAN_HOME: ${{ github.workspace }}/.conan2
CONAN_KEY_SUFFIX: r1

jobs:
build:
Expand All @@ -27,6 +29,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: checkout conan-odr-index
run: git submodule update --init --depth 1 conan-odr-index

- name: ubuntu install ccache
if: runner.os == 'Linux'
Expand All @@ -39,7 +43,7 @@ jobs:
brew install ccache
ccache -V

- name: setup python 3.12
- name: setup python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: 3.14
Expand All @@ -50,28 +54,34 @@ 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: cache conan
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ env.CONAN_HOME }}
key: conan-${{ matrix.host_profile }}-${{ env.CONAN_KEY_SUFFIX }}
restore-keys: |
conan-${{ matrix.host_profile }}-

- 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 ccache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}
restore-keys: |
ccache-${{ matrix.host_profile }}-

- 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@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ github.workspace }}/ccache
key: ${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}
restore-keys: |
${{ matrix.host_profile }}-
--build missing

- name: cmake
if: runner.os != 'Windows'
Expand Down Expand Up @@ -113,14 +123,17 @@ jobs:
build/test/odr_test
build/test/Release/odr_test.exe
build/_deps/odr.js-src
if-no-files-found: error
include-hidden-files: true

- name: Artifact .conan2/p dir
# TODO this is only needed because of data files from dependencies; there should be a better solution
- name: upload conan directory to github
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with:
name: conan2-${{ matrix.host_profile }}
path: ~/.conan2/p
name: conan-${{ matrix.host_profile }}
path: ${{ env.CONAN_HOME }}
if-no-files-found: error
compression-level: 0
include-hidden-files: true

docker:
needs: build
Expand Down Expand Up @@ -208,7 +221,7 @@ jobs:
if: runner.os == 'macOS'
run: brew install tidy-html5

- name: set up python 3.12
- name: set up python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: 3.14
Expand All @@ -221,11 +234,11 @@ jobs:
name: bin-${{ matrix.host_profile }}
path: .

- name: Download .conan2/p dir
- name: download conan directory
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: conan2-${{ matrix.host_profile }}
path: ~/.conan2/p
name: conan-${{ matrix.host_profile }}
path: ${{ env.CONAN_HOME }}

- name: fix artifact permissions
if: runner.os != 'Windows'
Expand Down Expand Up @@ -275,6 +288,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: checkout conan-odr-index
run: git submodule update --init --depth 1 conan-odr-index

- name: ubuntu install ccache
if: runner.os == 'Linux'
Expand All @@ -287,7 +302,7 @@ jobs:
brew install ccache
ccache -V

- name: set up python 3.12
- name: set up python 3.14
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: 3.14
Expand All @@ -298,30 +313,46 @@ 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: cache conan
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ env.CONAN_HOME }}
key: conan-${{ matrix.host_profile }}-${{ env.CONAN_KEY_SUFFIX }}
restore-keys: |
conan-${{ matrix.host_profile }}-

- 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 ccache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}
restore-keys: |
ccache-${{ 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 missing

- 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 missing

- name: cmake
run: >
Expand Down
54 changes: 41 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
release:
types: [published]

env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 1G
CCACHE_KEY_SUFFIX: r1
CONAN_HOME: ${{ github.workspace }}/.conan2
CONAN_KEY_SUFFIX: r1

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -15,6 +22,19 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: checkout conan-odr-index
run: git submodule update --init --depth 1 conan-odr-index

- name: ubuntu install ccache
if: runner.os == 'Linux'
run: |
sudo apt install ccache
ccache -V
- name: macos install ccache
if: runner.os == 'macOS'
run: |
brew install ccache
ccache -V

- name: set up python 3.12
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
Expand All @@ -26,33 +46,41 @@ 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: cache conan
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ env.CONAN_HOME }}
key: conan-${{ matrix.host_profile }}-${{ env.CONAN_KEY_SUFFIX }}
restore-keys: |
conan-${{ matrix.host_profile }}-

- 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 ccache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}
restore-keys: |
ccache-${{ 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 missing

- 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
Loading
Loading