mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
name: Run conan and cmake
|
|
description: Run conan and cmake
|
|
|
|
inputs:
|
|
conan_profile:
|
|
description: Conan profile name
|
|
required: true
|
|
force_conan_source_build:
|
|
description: Whether conan should build all dependencies from source
|
|
required: true
|
|
default: "false"
|
|
build_type:
|
|
description: Build type for third-party libraries and clio. Could be 'Release', 'Debug'
|
|
required: true
|
|
default: "Release"
|
|
build_integration_tests:
|
|
description: Whether to build integration tests
|
|
required: true
|
|
default: "true"
|
|
code_coverage:
|
|
description: Whether conan's coverage option should be on or not
|
|
required: true
|
|
default: "false"
|
|
static:
|
|
description: Whether Clio is to be statically linked
|
|
required: true
|
|
default: "false"
|
|
time_trace:
|
|
description: Whether to enable compiler trace reports
|
|
required: true
|
|
default: "false"
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Create build directory
|
|
shell: bash
|
|
run: mkdir -p build
|
|
|
|
- name: Run conan
|
|
shell: bash
|
|
env:
|
|
CONAN_BUILD_OPTION: "${{ inputs.force_conan_source_build == 'true' && '*' || 'missing' }}"
|
|
CODE_COVERAGE: "${{ inputs.code_coverage == 'true' && 'True' || 'False' }}"
|
|
STATIC_OPTION: "${{ inputs.static == 'true' && 'True' || 'False' }}"
|
|
INTEGRATION_TESTS_OPTION: "${{ inputs.build_integration_tests == 'true' && 'True' || 'False' }}"
|
|
TIME_TRACE: "${{ inputs.time_trace == 'true' && 'True' || 'False' }}"
|
|
run: |
|
|
cd build
|
|
conan \
|
|
install .. \
|
|
-of . \
|
|
-b "$CONAN_BUILD_OPTION" \
|
|
-s "build_type=${{ inputs.build_type }}" \
|
|
-o "&:static=${STATIC_OPTION}" \
|
|
-o "&:tests=True" \
|
|
-o "&:integration_tests=${INTEGRATION_TESTS_OPTION}" \
|
|
-o "&:lint=False" \
|
|
-o "&:coverage=${CODE_COVERAGE}" \
|
|
-o "&:time_trace=${TIME_TRACE}" \
|
|
--profile:all "${{ inputs.conan_profile }}"
|
|
|
|
- name: Run cmake
|
|
shell: bash
|
|
env:
|
|
BUILD_TYPE: "${{ inputs.build_type }}"
|
|
SANITIZER_OPTION: |-
|
|
${{ endsWith(inputs.conan_profile, '.asan') && '-Dsan=address' ||
|
|
endsWith(inputs.conan_profile, '.tsan') && '-Dsan=thread' ||
|
|
endsWith(inputs.conan_profile, '.ubsan') && '-Dsan=undefined' ||
|
|
'' }}
|
|
run: |
|
|
cd build
|
|
cmake \
|
|
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
"${SANITIZER_OPTION}" \
|
|
.. \
|
|
-G Ninja
|