mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
Let's see if this does the trick.
Alternatives are
- more complicated cleanup using sed or similar
- don't multiline the expression (e.g. "${{ multiline expression becomes
single line }}")
- don't wrap `SANITIZER_OPTION` in double quotes (like it was before)
- something else that i did not find - let me know if you know
89 lines
2.6 KiB
YAML
89 lines
2.6 KiB
YAML
name: Run conan and cmake
|
|
description: Run conan and cmake
|
|
|
|
inputs:
|
|
conan_profile:
|
|
description: Conan profile name
|
|
required: true
|
|
conan_cache_hit:
|
|
description: Whether conan cache has been downloaded
|
|
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"
|
|
sanitizer:
|
|
description: Sanitizer to use
|
|
required: true
|
|
default: "false"
|
|
choices:
|
|
- "false"
|
|
- "tsan"
|
|
- "asan"
|
|
- "ubsan"
|
|
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:
|
|
BUILD_OPTION: "${{ inputs.conan_cache_hit == '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 $BUILD_OPTION \
|
|
-s build_type="${{ inputs.build_type }}" \
|
|
-o clio:static="${STATIC_OPTION}" \
|
|
-o clio:tests=True \
|
|
-o clio:integration_tests="${INTEGRATION_TESTS_OPTION}" \
|
|
-o clio:lint=False \
|
|
-o clio:coverage="${CODE_COVERAGE}" \
|
|
-o clio:time_trace="${TIME_TRACE}" \
|
|
--profile "${{ inputs.conan_profile }}"
|
|
|
|
- name: Run cmake
|
|
shell: bash
|
|
env:
|
|
BUILD_TYPE: "${{ inputs.build_type }}"
|
|
SANITIZER_OPTION: |-
|
|
${{ inputs.sanitizer == 'tsan' && '-Dsan=thread' ||
|
|
inputs.sanitizer == 'ubsan' && '-Dsan=undefined' ||
|
|
inputs.sanitizer == 'asan' && '-Dsan=address' ||
|
|
'' }}
|
|
run: |
|
|
cd build
|
|
cmake \
|
|
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
"${SANITIZER_OPTION}" \
|
|
.. \
|
|
-G Ninja
|