mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-14 16:15:51 +00:00
Merge branch 'develop' into ximinez/lending-XLS-66
This commit is contained in:
43
.github/actions/dependencies/action.yml
vendored
43
.github/actions/dependencies/action.yml
vendored
@@ -6,36 +6,33 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: unlock Conan
|
|
||||||
shell: bash
|
|
||||||
run: conan remove --locks
|
|
||||||
- name: export custom recipes
|
- name: export custom recipes
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
conan config set general.revisions_enabled=1
|
conan export --version 1.1.10 external/snappy
|
||||||
conan export external/snappy snappy/1.1.10@
|
conan export --version 9.7.3 external/rocksdb
|
||||||
conan export external/rocksdb rocksdb/9.7.3@
|
conan export --version 4.0.3 external/soci
|
||||||
conan export external/soci soci/4.0.3@
|
conan export --version 2.0.8 external/nudb
|
||||||
conan export external/nudb nudb/2.0.8@
|
|
||||||
- name: add Ripple Conan remote
|
- name: add Ripple Conan remote
|
||||||
|
if: env.CONAN_URL != ''
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
conan remote list
|
if conan remote list | grep -q "ripple"; then
|
||||||
conan remote remove ripple || true
|
conan remote remove ripple
|
||||||
# Do not quote the URL. An empty string will be accepted (with
|
echo "Removed conan remote ripple"
|
||||||
# a non-fatal warning), but a missing argument will not.
|
fi
|
||||||
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
|
conan remote add --index 0 ripple "${CONAN_URL}"
|
||||||
|
echo "Added conan remote ripple at ${CONAN_URL}"
|
||||||
|
|
||||||
- name: try to authenticate to Ripple Conan remote
|
- name: try to authenticate to Ripple Conan remote
|
||||||
|
if: env.CONAN_LOGIN_USERNAME_RIPPLE != '' && env.CONAN_PASSWORD_RIPPLE != ''
|
||||||
id: remote
|
id: remote
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# `conan user` implicitly uses the environment variables
|
echo "Authenticating to ripple remote..."
|
||||||
# CONAN_LOGIN_USERNAME_<REMOTE> and CONAN_PASSWORD_<REMOTE>.
|
conan remote auth ripple --force
|
||||||
# https://docs.conan.io/1/reference/commands/misc/user.html#using-environment-variables
|
conan remote list-users
|
||||||
# https://docs.conan.io/1/reference/env_vars.html#conan-login-username-conan-login-username-remote-name
|
|
||||||
# https://docs.conan.io/1/reference/env_vars.html#conan-password-conan-password-remote-name
|
|
||||||
echo outcome=$(conan user --remote ripple --password >&2 \
|
|
||||||
&& echo success || echo failure) | tee ${GITHUB_OUTPUT}
|
|
||||||
- name: list missing binaries
|
- name: list missing binaries
|
||||||
id: binaries
|
id: binaries
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -51,7 +48,7 @@ runs:
|
|||||||
conan install \
|
conan install \
|
||||||
--output-folder . \
|
--output-folder . \
|
||||||
--build missing \
|
--build missing \
|
||||||
--options tests=True \
|
--options:host "&:tests=True" \
|
||||||
--options xrpld=True \
|
--options:host "&:xrpld=True" \
|
||||||
--settings build_type=${{ inputs.configuration }} \
|
--settings:all build_type=${{ inputs.configuration }} \
|
||||||
..
|
..
|
||||||
|
|||||||
20
.github/workflows/clang-format.yml
vendored
20
.github/workflows/clang-format.yml
vendored
@@ -9,24 +9,16 @@ jobs:
|
|||||||
check:
|
check:
|
||||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
env:
|
container: ghcr.io/xrplf/ci/tools-rippled-clang-format
|
||||||
CLANG_VERSION: 18
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install clang-format
|
|
||||||
run: |
|
|
||||||
codename=$( lsb_release --codename --short )
|
|
||||||
sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null <<EOF
|
|
||||||
deb http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
|
||||||
deb-src http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-${CLANG_VERSION} main
|
|
||||||
EOF
|
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install clang-format-${CLANG_VERSION}
|
|
||||||
- name: Format first-party sources
|
- name: Format first-party sources
|
||||||
run: find include src tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
|
run: |
|
||||||
|
clang-format --version
|
||||||
|
find include src tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format -i {} +
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
id: assert
|
id: assert
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
git diff --exit-code | tee "clang-format.patch"
|
git diff --exit-code | tee "clang-format.patch"
|
||||||
@@ -58,6 +50,6 @@ jobs:
|
|||||||
in your repo, commit, and push.
|
in your repo, commit, and push.
|
||||||
run: |
|
run: |
|
||||||
echo "${PREAMBLE}"
|
echo "${PREAMBLE}"
|
||||||
clang-format-${CLANG_VERSION} --version
|
clang-format --version
|
||||||
echo "${SUGGESTION}"
|
echo "${SUGGESTION}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
45
.github/workflows/macos.yml
vendored
45
.github/workflows/macos.yml
vendored
@@ -15,6 +15,18 @@ on:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
# This part of Conan configuration is specific to this workflow only; we do not want
|
||||||
|
# to pollute conan/profiles directory with settings which might not work for others
|
||||||
|
env:
|
||||||
|
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev
|
||||||
|
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
||||||
|
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
||||||
|
CONAN_GLOBAL_CONF: |
|
||||||
|
core.download:parallel={{os.cpu_count()}}
|
||||||
|
core.upload:parallel={{os.cpu_count()}}
|
||||||
|
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
|
||||||
|
tools.build:verbosity=verbose
|
||||||
|
tools.compilation:verbosity=verbose
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -35,16 +47,15 @@ jobs:
|
|||||||
NUM_PROCESSORS: 12
|
NUM_PROCESSORS: 12
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: install Conan
|
- name: install Conan
|
||||||
run: |
|
run: |
|
||||||
brew install conan@1
|
brew install conan
|
||||||
echo '/opt/homebrew/opt/conan@1/bin' >> $GITHUB_PATH
|
|
||||||
- name: install Ninja
|
- name: install Ninja
|
||||||
if: matrix.generator == 'Ninja'
|
if: matrix.generator == 'Ninja'
|
||||||
run: brew install ninja
|
run: brew install ninja
|
||||||
- name: install python
|
- name: install python
|
||||||
run: |
|
run: |
|
||||||
if which python > /dev/null 2>&1; then
|
if which python > /dev/null 2>&1; then
|
||||||
echo "Python executable exists"
|
echo "Python executable exists"
|
||||||
else
|
else
|
||||||
@@ -76,14 +87,28 @@ jobs:
|
|||||||
clang --version
|
clang --version
|
||||||
- name: configure Conan
|
- name: configure Conan
|
||||||
run : |
|
run : |
|
||||||
conan profile new default --detect || true
|
echo "${CONAN_GLOBAL_CONF}" > global.conf
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
||||||
|
conan profile show
|
||||||
|
- name: export custom recipes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan export --version 1.1.10 external/snappy
|
||||||
|
conan export --version 9.7.3 external/rocksdb
|
||||||
|
conan export --version 4.0.3 external/soci
|
||||||
|
conan export --version 2.0.8 external/nudb
|
||||||
|
- name: add Ripple Conan remote
|
||||||
|
if: env.CONAN_URL != ''
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if conan remote list | grep -q "ripple"; then
|
||||||
|
conan remote remove ripple
|
||||||
|
echo "Removed conan remote ripple"
|
||||||
|
fi
|
||||||
|
conan remote add --index 0 ripple "${CONAN_URL}"
|
||||||
|
echo "Added conan remote ripple at ${CONAN_URL}"
|
||||||
- name: build dependencies
|
- name: build dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
|
||||||
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
- name: build
|
- name: build
|
||||||
|
|||||||
197
.github/workflows/nix.yml
vendored
197
.github/workflows/nix.yml
vendored
@@ -16,6 +16,19 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# This part of Conan configuration is specific to this workflow only; we do not want
|
||||||
|
# to pollute conan/profiles directory with settings which might not work for others
|
||||||
|
env:
|
||||||
|
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev
|
||||||
|
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
||||||
|
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
||||||
|
CONAN_GLOBAL_CONF: |
|
||||||
|
core.download:parallel={{ os.cpu_count() }}
|
||||||
|
core.upload:parallel={{ os.cpu_count() }}
|
||||||
|
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
|
||||||
|
tools.build:verbosity=verbose
|
||||||
|
tools.compilation:verbosity=verbose
|
||||||
|
|
||||||
# This workflow has multiple job matrixes.
|
# This workflow has multiple job matrixes.
|
||||||
# They can be considered phases because most of the matrices ("test",
|
# They can be considered phases because most of the matrices ("test",
|
||||||
# "coverage", "conan", ) depend on the first ("dependencies").
|
# "coverage", "conan", ) depend on the first ("dependencies").
|
||||||
@@ -54,59 +67,45 @@ jobs:
|
|||||||
- Release
|
- Release
|
||||||
include:
|
include:
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
profile:
|
compiler_version: 12
|
||||||
version: 11
|
distro: ubuntu
|
||||||
cc: /usr/bin/gcc
|
codename: jammy
|
||||||
cxx: /usr/bin/g++
|
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
profile:
|
compiler_version: 16
|
||||||
version: 14
|
distro: debian
|
||||||
cc: /usr/bin/clang-14
|
codename: bookworm
|
||||||
cxx: /usr/bin/clang++-14
|
|
||||||
runs-on: [self-hosted, heavy]
|
runs-on: [self-hosted, heavy]
|
||||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
container: ghcr.io/xrplf/ci/${{ matrix.distro }}-${{ matrix.codename }}:${{ matrix.compiler }}-${{ matrix.compiler_version }}
|
||||||
env:
|
env:
|
||||||
build_dir: .build
|
build_dir: .build
|
||||||
steps:
|
steps:
|
||||||
- name: upgrade conan
|
|
||||||
run: |
|
|
||||||
pip install --upgrade "conan<2"
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: check environment
|
- name: check environment
|
||||||
run: |
|
run: |
|
||||||
echo ${PATH} | tr ':' '\n'
|
echo ${PATH} | tr ':' '\n'
|
||||||
lsb_release -a || true
|
lsb_release -a || true
|
||||||
${{ matrix.profile.cc }} --version
|
${{ matrix.compiler }}-${{ matrix.compiler_version }} --version
|
||||||
conan --version
|
conan --version
|
||||||
cmake --version
|
cmake --version
|
||||||
env | sort
|
env | sort
|
||||||
- name: configure Conan
|
- name: configure Conan
|
||||||
run: |
|
run: |
|
||||||
conan profile new default --detect
|
echo "${CONAN_GLOBAL_CONF}" >> ${CONAN_HOME}/global.conf
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
conan profile show
|
||||||
conan profile update settings.compiler=${{ matrix.compiler }} default
|
|
||||||
conan profile update settings.compiler.version=${{ matrix.profile.version }} default
|
|
||||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
||||||
conan profile update env.CC=${{ matrix.profile.cc }} default
|
|
||||||
conan profile update env.CXX=${{ matrix.profile.cxx }} default
|
|
||||||
conan profile update conf.tools.build:compiler_executables='{"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default
|
|
||||||
- name: archive profile
|
- name: archive profile
|
||||||
# Create this archive before dependencies are added to the local cache.
|
# Create this archive before dependencies are added to the local cache.
|
||||||
run: tar -czf conan.tar -C ~/.conan .
|
run: tar -czf conan.tar.gz -C ${CONAN_HOME} .
|
||||||
- name: build dependencies
|
- name: build dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
|
||||||
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
- name: upload archive
|
- name: upload archive
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
path: conan.tar
|
path: conan.tar.gz
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@@ -121,26 +120,32 @@ jobs:
|
|||||||
configuration:
|
configuration:
|
||||||
- Debug
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
|
include:
|
||||||
|
- compiler: gcc
|
||||||
|
compiler_version: 12
|
||||||
|
distro: ubuntu
|
||||||
|
codename: jammy
|
||||||
|
- compiler: clang
|
||||||
|
compiler_version: 16
|
||||||
|
distro: debian
|
||||||
|
codename: bookworm
|
||||||
cmake-args:
|
cmake-args:
|
||||||
-
|
-
|
||||||
- "-Dunity=ON"
|
- "-Dunity=ON"
|
||||||
needs: dependencies
|
needs: dependencies
|
||||||
runs-on: [self-hosted, heavy]
|
runs-on: [self-hosted, heavy]
|
||||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
container: ghcr.io/xrplf/ci/${{ matrix.distro }}-${{ matrix.codename }}:${{ matrix.compiler }}-${{ matrix.compiler_version }}
|
||||||
env:
|
env:
|
||||||
build_dir: .build
|
build_dir: .build
|
||||||
steps:
|
steps:
|
||||||
- name: upgrade conan
|
|
||||||
run: |
|
|
||||||
pip install --upgrade "conan<2"
|
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.conan
|
mkdir -p ${CONAN_HOME}
|
||||||
tar -xzf conan.tar -C ~/.conan
|
tar -xzf conan.tar.gz -C ${CONAN_HOME}
|
||||||
- name: check environment
|
- name: check environment
|
||||||
run: |
|
run: |
|
||||||
env | sort
|
env | sort
|
||||||
@@ -148,11 +153,9 @@ jobs:
|
|||||||
conan --version
|
conan --version
|
||||||
cmake --version
|
cmake --version
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: dependencies
|
- name: dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
- name: build
|
- name: build
|
||||||
@@ -182,21 +185,18 @@ jobs:
|
|||||||
- "-DUNIT_TEST_REFERENCE_FEE=1000"
|
- "-DUNIT_TEST_REFERENCE_FEE=1000"
|
||||||
needs: dependencies
|
needs: dependencies
|
||||||
runs-on: [self-hosted, heavy]
|
runs-on: [self-hosted, heavy]
|
||||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
container: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12
|
||||||
env:
|
env:
|
||||||
build_dir: .build
|
build_dir: .build
|
||||||
steps:
|
steps:
|
||||||
- name: upgrade conan
|
|
||||||
run: |
|
|
||||||
pip install --upgrade "conan<2"
|
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.conan
|
mkdir -p ${CONAN_HOME}
|
||||||
tar -xzf conan.tar -C ~/.conan
|
tar -xzf conan.tar.gz -C ${CONAN_HOME}
|
||||||
- name: check environment
|
- name: check environment
|
||||||
run: |
|
run: |
|
||||||
env | sort
|
env | sort
|
||||||
@@ -204,11 +204,9 @@ jobs:
|
|||||||
conan --version
|
conan --version
|
||||||
cmake --version
|
cmake --version
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: dependencies
|
- name: dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
- name: build
|
- name: build
|
||||||
@@ -234,23 +232,18 @@ jobs:
|
|||||||
- Debug
|
- Debug
|
||||||
needs: dependencies
|
needs: dependencies
|
||||||
runs-on: [self-hosted, heavy]
|
runs-on: [self-hosted, heavy]
|
||||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
container: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12
|
||||||
env:
|
env:
|
||||||
build_dir: .build
|
build_dir: .build
|
||||||
steps:
|
steps:
|
||||||
- name: upgrade conan
|
|
||||||
run: |
|
|
||||||
pip install --upgrade "conan<2"
|
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.conan
|
mkdir -p ${CONAN_HOME}
|
||||||
tar -xzf conan.tar -C ~/.conan
|
tar -xzf conan.tar.gz -C ${CONAN_HOME}
|
||||||
- name: install gcovr
|
|
||||||
run: pip install "gcovr>=7,<9"
|
|
||||||
- name: check environment
|
- name: check environment
|
||||||
run: |
|
run: |
|
||||||
echo ${PATH} | tr ':' '\n'
|
echo ${PATH} | tr ':' '\n'
|
||||||
@@ -258,13 +251,11 @@ jobs:
|
|||||||
cmake --version
|
cmake --version
|
||||||
gcovr --version
|
gcovr --version
|
||||||
env | sort
|
env | sort
|
||||||
ls ~/.conan
|
ls ${CONAN_HOME}
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: dependencies
|
- name: dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration }}
|
configuration: ${{ matrix.configuration }}
|
||||||
- name: build
|
- name: build
|
||||||
@@ -286,7 +277,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mv "${build_dir}/coverage.xml" ./
|
mv "${build_dir}/coverage.xml" ./
|
||||||
- name: archive coverage report
|
- name: archive coverage report
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||||
with:
|
with:
|
||||||
name: coverage.xml
|
name: coverage.xml
|
||||||
path: coverage.xml
|
path: coverage.xml
|
||||||
@@ -305,25 +296,28 @@ jobs:
|
|||||||
attempt_limit: 5
|
attempt_limit: 5
|
||||||
attempt_delay: 210000 # in milliseconds
|
attempt_delay: 210000 # in milliseconds
|
||||||
|
|
||||||
|
|
||||||
conan:
|
conan:
|
||||||
needs: dependencies
|
needs: dependencies
|
||||||
runs-on: [self-hosted, heavy]
|
runs-on: [self-hosted, heavy]
|
||||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
container:
|
||||||
|
image: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12
|
||||||
env:
|
env:
|
||||||
build_dir: .build
|
build_dir: .build
|
||||||
|
platform: linux
|
||||||
|
compiler: gcc
|
||||||
|
compiler_version: 12
|
||||||
configuration: Release
|
configuration: Release
|
||||||
steps:
|
steps:
|
||||||
- name: upgrade conan
|
|
||||||
run: |
|
|
||||||
pip install --upgrade "conan<2"
|
|
||||||
- name: download cache
|
- name: download cache
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
||||||
with:
|
with:
|
||||||
name: linux-gcc-${{ env.configuration }}
|
name: ${{ env.platform }}-${{ env.compiler }}-${{ env.configuration }}
|
||||||
|
|
||||||
- name: extract cache
|
- name: extract cache
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.conan
|
mkdir -p ${CONAN_HOME}
|
||||||
tar -xzf conan.tar -C ~/.conan
|
tar -xzf conan.tar.gz -C ${CONAN_HOME}
|
||||||
- name: check environment
|
- name: check environment
|
||||||
run: |
|
run: |
|
||||||
env | sort
|
env | sort
|
||||||
@@ -331,27 +325,22 @@ jobs:
|
|||||||
conan --version
|
conan --version
|
||||||
cmake --version
|
cmake --version
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: dependencies
|
- name: dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ env.configuration }}
|
configuration: ${{ env.configuration }}
|
||||||
- name: export
|
- name: export
|
||||||
run: |
|
run: |
|
||||||
version=$(conan inspect --raw version .)
|
conan export . --version head
|
||||||
reference="xrpl/${version}@local/test"
|
|
||||||
conan remove -f ${reference} || true
|
|
||||||
conan export . local/test
|
|
||||||
echo "reference=${reference}" >> "${GITHUB_ENV}"
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
cd tests/conan
|
cd tests/conan
|
||||||
mkdir ${build_dir}
|
mkdir ${build_dir} && cd ${build_dir}
|
||||||
cd ${build_dir}
|
conan install .. \
|
||||||
conan install .. --output-folder . \
|
--settings:all build_type=${configuration} \
|
||||||
--require-override ${reference} --build missing
|
--output-folder . \
|
||||||
|
--build missing
|
||||||
cmake .. \
|
cmake .. \
|
||||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=./build/${configuration}/generators/conan_toolchain.cmake \
|
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=./build/${configuration}/generators/conan_toolchain.cmake \
|
||||||
-DCMAKE_BUILD_TYPE=${configuration}
|
-DCMAKE_BUILD_TYPE=${configuration}
|
||||||
@@ -366,60 +355,30 @@ jobs:
|
|||||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||||
env:
|
env:
|
||||||
CLANG_RELEASE: 16
|
CLANG_RELEASE: 16
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
runs-on: [self-hosted, heavy]
|
runs-on: [self-hosted, heavy]
|
||||||
container: debian:bookworm
|
container: ghcr.io/xrplf/ci/debian-bookworm:clang-16
|
||||||
steps:
|
|
||||||
- name: install prerequisites
|
|
||||||
env:
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install --yes --no-install-recommends \
|
|
||||||
clang-${CLANG_RELEASE} clang++-${CLANG_RELEASE} \
|
|
||||||
python3-pip python-is-python3 make cmake git wget
|
|
||||||
apt-get clean
|
|
||||||
update-alternatives --install \
|
|
||||||
/usr/bin/clang clang /usr/bin/clang-${CLANG_RELEASE} 100 \
|
|
||||||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_RELEASE}
|
|
||||||
update-alternatives --auto clang
|
|
||||||
pip install --no-cache --break-system-packages "conan<2"
|
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
|
|
||||||
- name: prepare environment
|
- name: prepare environment
|
||||||
run: |
|
run: |
|
||||||
mkdir ${GITHUB_WORKSPACE}/.build
|
mkdir ${GITHUB_WORKSPACE}/.build
|
||||||
echo "SOURCE_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
echo "SOURCE_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||||
echo "BUILD_DIR=$GITHUB_WORKSPACE/.build" >> $GITHUB_ENV
|
echo "BUILD_DIR=$GITHUB_WORKSPACE/.build" >> $GITHUB_ENV
|
||||||
echo "CC=/usr/bin/clang" >> $GITHUB_ENV
|
|
||||||
echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: configure Conan
|
- name: configure Conan
|
||||||
run: |
|
run: |
|
||||||
conan profile new --detect default
|
echo "${CONAN_GLOBAL_CONF}" >> ${CONAN_HOME}/global.conf
|
||||||
conan profile update settings.compiler=clang default
|
conan profile show
|
||||||
conan profile update settings.compiler.version=${CLANG_RELEASE} default
|
|
||||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
|
||||||
conan profile update options.rocksdb=False default
|
|
||||||
conan profile update \
|
|
||||||
'conf.tools.build:compiler_executables={"c": "/usr/bin/clang", "cpp": "/usr/bin/clang++"}' default
|
|
||||||
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default
|
|
||||||
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
|
|
||||||
conan export external/snappy snappy/1.1.10@
|
|
||||||
conan export external/soci soci/4.0.3@
|
|
||||||
|
|
||||||
- name: build dependencies
|
- name: build dependencies
|
||||||
run: |
|
run: |
|
||||||
cd ${BUILD_DIR}
|
cd ${BUILD_DIR}
|
||||||
conan install ${SOURCE_DIR} \
|
conan install ${SOURCE_DIR} \
|
||||||
--output-folder ${BUILD_DIR} \
|
--output-folder ${BUILD_DIR} \
|
||||||
--install-folder ${BUILD_DIR} \
|
|
||||||
--build missing \
|
--build missing \
|
||||||
--settings build_type=Debug
|
--settings:all build_type=Debug
|
||||||
|
|
||||||
- name: build with instrumentation
|
- name: build with instrumentation
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
52
.github/workflows/windows.yml
vendored
52
.github/workflows/windows.yml
vendored
@@ -18,6 +18,18 @@ on:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
# This part of Conan configuration is specific to this workflow only; we do not want
|
||||||
|
# to pollute conan/profiles directory with settings which might not work for others
|
||||||
|
env:
|
||||||
|
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev
|
||||||
|
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
||||||
|
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
||||||
|
CONAN_GLOBAL_CONF: |
|
||||||
|
core.download:parallel={{os.cpu_count()}}
|
||||||
|
core.upload:parallel={{os.cpu_count()}}
|
||||||
|
tools.build:jobs=24
|
||||||
|
tools.build:verbosity=verbose
|
||||||
|
tools.compilation:verbosity=verbose
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -42,11 +54,11 @@ jobs:
|
|||||||
build_dir: .build
|
build_dir: .build
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
- name: choose Python
|
- name: choose Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.13
|
||||||
- name: learn Python cache directory
|
- name: learn Python cache directory
|
||||||
id: pip-cache
|
id: pip-cache
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -54,12 +66,12 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
echo "dir=$(pip cache dir)" | tee ${GITHUB_OUTPUT}
|
echo "dir=$(pip cache dir)" | tee ${GITHUB_OUTPUT}
|
||||||
- name: restore Python cache directory
|
- name: restore Python cache directory
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }}
|
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }}
|
||||||
- name: install Conan
|
- name: install Conan
|
||||||
run: pip install wheel 'conan<2'
|
run: pip install wheel conan
|
||||||
- name: check environment
|
- name: check environment
|
||||||
run: |
|
run: |
|
||||||
dir env:
|
dir env:
|
||||||
@@ -70,17 +82,29 @@ jobs:
|
|||||||
- name: configure Conan
|
- name: configure Conan
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
conan profile new default --detect
|
echo "${CONAN_GLOBAL_CONF}" > global.conf
|
||||||
conan profile update settings.compiler.cppstd=20 default
|
mv conan/profiles/libxrpl conan/profiles/default
|
||||||
conan profile update \
|
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
||||||
settings.compiler.runtime=MT${{ matrix.configuration.runtime }} \
|
conan profile show
|
||||||
default
|
- name: export custom recipes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
conan export --version 1.1.10 external/snappy
|
||||||
|
conan export --version 9.7.3 external/rocksdb
|
||||||
|
conan export --version 4.0.3 external/soci
|
||||||
|
conan export --version 2.0.8 external/nudb
|
||||||
|
- name: add Ripple Conan remote
|
||||||
|
if: env.CONAN_URL != ''
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if conan remote list | grep -q "ripple"; then
|
||||||
|
conan remote remove ripple
|
||||||
|
echo "Removed conan remote ripple"
|
||||||
|
fi
|
||||||
|
conan remote add --index 0 ripple "${CONAN_URL}"
|
||||||
|
echo "Added conan remote ripple at ${CONAN_URL}"
|
||||||
- name: build dependencies
|
- name: build dependencies
|
||||||
uses: ./.github/actions/dependencies
|
uses: ./.github/actions/dependencies
|
||||||
env:
|
|
||||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
||||||
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
|
||||||
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
configuration: ${{ matrix.configuration.type }}
|
configuration: ${{ matrix.configuration.type }}
|
||||||
- name: build
|
- name: build
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# .pre-commit-config.yaml
|
# .pre-commit-config.yaml
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
rev: v18.1.3
|
rev: v18.1.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
|
|||||||
23
conan/profiles/libxrpl
Normal file
23
conan/profiles/libxrpl
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{% set os = detect_api.detect_os() %}
|
||||||
|
{% set arch = detect_api.detect_arch() %}
|
||||||
|
{% set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
|
||||||
|
{% set compiler_version = version %}
|
||||||
|
{% if os == "Linux" %}
|
||||||
|
{% set compiler_version = detect_api.default_compiler_version(compiler, version) %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if os == "Linux" %}
|
||||||
|
include(default)
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
os={{ os }}
|
||||||
|
arch={{ arch }}
|
||||||
|
compiler={{compiler}}
|
||||||
|
compiler.version={{ compiler_version }}
|
||||||
|
compiler.cppstd=20
|
||||||
|
{% if os == "Windows" %}
|
||||||
|
compiler.runtime=static
|
||||||
|
{% else %}
|
||||||
|
compiler.libcxx={{detect_api.detect_libcxx(compiler, version, compiler_exe)}}
|
||||||
|
{% endif %}
|
||||||
20
conanfile.py
20
conanfile.py
@@ -24,7 +24,6 @@ class Xrpl(ConanFile):
|
|||||||
}
|
}
|
||||||
|
|
||||||
requires = [
|
requires = [
|
||||||
'doctest/2.4.11',
|
|
||||||
'grpc/1.50.1',
|
'grpc/1.50.1',
|
||||||
'libarchive/3.7.6',
|
'libarchive/3.7.6',
|
||||||
'nudb/2.0.8',
|
'nudb/2.0.8',
|
||||||
@@ -33,6 +32,10 @@ class Xrpl(ConanFile):
|
|||||||
'zlib/1.3.1',
|
'zlib/1.3.1',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
test_requires = [
|
||||||
|
'doctest/2.4.11',
|
||||||
|
]
|
||||||
|
|
||||||
tool_requires = [
|
tool_requires = [
|
||||||
'protobuf/3.21.9',
|
'protobuf/3.21.9',
|
||||||
]
|
]
|
||||||
@@ -86,12 +89,13 @@ class Xrpl(ConanFile):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def set_version(self):
|
def set_version(self):
|
||||||
path = f'{self.recipe_folder}/src/libxrpl/protocol/BuildInfo.cpp'
|
if self.version is None:
|
||||||
regex = r'versionString\s?=\s?\"(.*)\"'
|
path = f'{self.recipe_folder}/src/libxrpl/protocol/BuildInfo.cpp'
|
||||||
with open(path, 'r') as file:
|
regex = r'versionString\s?=\s?\"(.*)\"'
|
||||||
matches = (re.search(regex, line) for line in file)
|
with open(path, encoding='utf-8') as file:
|
||||||
match = next(m for m in matches if m)
|
matches = (re.search(regex, line) for line in file)
|
||||||
self.version = match.group(1)
|
match = next(m for m in matches if m)
|
||||||
|
self.version = match.group(1)
|
||||||
|
|
||||||
def configure(self):
|
def configure(self):
|
||||||
if self.settings.compiler == 'apple-clang':
|
if self.settings.compiler == 'apple-clang':
|
||||||
@@ -139,6 +143,8 @@ class Xrpl(ConanFile):
|
|||||||
tc.variables['static'] = self.options.static
|
tc.variables['static'] = self.options.static
|
||||||
tc.variables['unity'] = self.options.unity
|
tc.variables['unity'] = self.options.unity
|
||||||
tc.variables['xrpld'] = self.options.xrpld
|
tc.variables['xrpld'] = self.options.xrpld
|
||||||
|
if self.settings.compiler == 'clang' and self.settings.compiler.version == 16:
|
||||||
|
tc.extra_cxxflags = ["-DBOOST_ASIO_DISABLE_CONCEPTS"]
|
||||||
tc.generate()
|
tc.generate()
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ project(
|
|||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(xrpl REQUIRED)
|
find_package(xrpl CONFIG REQUIRED)
|
||||||
|
|
||||||
add_executable(example)
|
add_executable(example)
|
||||||
target_sources(example PRIVATE src/example.cpp)
|
target_sources(example PRIVATE src/example.cpp)
|
||||||
|
|||||||
@@ -1,59 +1,42 @@
|
|||||||
from conan import ConanFile, conan_version
|
from pathlib import Path
|
||||||
|
|
||||||
|
from conan import ConanFile
|
||||||
|
from conan.tools.build import can_run
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
from conan.tools.cmake import CMake, cmake_layout
|
||||||
|
|
||||||
class Example(ConanFile):
|
class Example(ConanFile):
|
||||||
|
|
||||||
def set_name(self):
|
name = 'example'
|
||||||
if self.name is None:
|
license = 'ISC'
|
||||||
self.name = 'example'
|
author = 'John Freeman <jfreeman08@gmail.com>, Michael Legleux <mlegleux@ripple.com'
|
||||||
|
|
||||||
|
settings = 'os', 'compiler', 'build_type', 'arch'
|
||||||
|
|
||||||
|
requires = ["xrpl/head"]
|
||||||
|
|
||||||
|
default_options = {
|
||||||
|
'xrpl/*:xrpld': False,
|
||||||
|
}
|
||||||
|
|
||||||
|
generators = ['CMakeDeps', 'CMakeToolchain']
|
||||||
|
|
||||||
def set_version(self):
|
def set_version(self):
|
||||||
if self.version is None:
|
if self.version is None:
|
||||||
self.version = '0.1.0'
|
self.version = '0.1.0'
|
||||||
|
|
||||||
license = 'ISC'
|
|
||||||
author = 'John Freeman <jfreeman08@gmail.com>'
|
|
||||||
|
|
||||||
settings = 'os', 'compiler', 'build_type', 'arch'
|
|
||||||
options = {'shared': [True, False], 'fPIC': [True, False]}
|
|
||||||
default_options = {
|
|
||||||
'shared': False,
|
|
||||||
'fPIC': True,
|
|
||||||
'xrpl:xrpld': False,
|
|
||||||
}
|
|
||||||
|
|
||||||
requires = ['xrpl/2.2.0-rc1@jfreeman/nodestore']
|
|
||||||
generators = ['CMakeDeps', 'CMakeToolchain']
|
|
||||||
|
|
||||||
exports_sources = [
|
|
||||||
'CMakeLists.txt',
|
|
||||||
'cmake/*',
|
|
||||||
'external/*',
|
|
||||||
'include/*',
|
|
||||||
'src/*',
|
|
||||||
]
|
|
||||||
|
|
||||||
# For out-of-source build.
|
|
||||||
# https://docs.conan.io/en/latest/reference/build_helpers/cmake.html#configure
|
|
||||||
no_copy_source = True
|
|
||||||
|
|
||||||
def layout(self):
|
def layout(self):
|
||||||
cmake_layout(self)
|
cmake_layout(self)
|
||||||
|
|
||||||
def config_options(self):
|
|
||||||
if self.settings.os == 'Windows':
|
|
||||||
del self.options.fPIC
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.configure(variables={'BUILD_TESTING': 'NO'})
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_info(self):
|
def test(self):
|
||||||
path = f'{self.package_folder}/share/{self.name}/cpp_info.py'
|
if can_run(self):
|
||||||
with open(path, 'r') as file:
|
cmd_path = Path(self.build_folder) / self.cpp.build.bindir / "example"
|
||||||
exec(file.read(), {}, {'self': self.cpp_info})
|
self.run(cmd_path, env="conanrun")
|
||||||
|
|||||||
Reference in New Issue
Block a user