Skip to content

Add SDK utility for off-chain operations #63

Add SDK utility for off-chain operations

Add SDK utility for off-chain operations #63

Workflow file for this run

name: Build and Test
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
sanitizer_ext: [.asan, .tsan, .ubsan]
build_type: [Release, Debug]
os: [heavy, heavy-arm64]
container:
[
'{ "image": "ghcr.io/xrplf/clio-ci:14342e087ceb8b593027198bf9ef06a43833c696" }',
]
include:
- compiler: apple-clang
build_type: Release
os: macos15
- compiler: apple-clang
build_type: Debug
os: macos15
runs-on: ${{ matrix.os }}
container: ${{ matrix.container != '' && fromJson(matrix.container) || null }}
timeout-minutes: 10
env:
BUILD_DIR: build
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- name: Cleanup workspace
if: ${{ runner.os == 'macOS' }}
uses: XRPLF/actions/cleanup-workspace@cf0433aa74563aead044a1e395610c96d65a37cf
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Prepare runner
uses: XRPLF/actions/prepare-runner@2cbf481018d930656e9276fcc20dc0e3a0be5b6d
with:
enable_ccache: false
- name: Set up Conan (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
conan remote add --index 0 xrplf https://conan.ripplex.io
mkdir -p "${CONAN_HOME}"/profiles/
cp .github/scripts/conan/apple-clang.profile "${CONAN_HOME}"/profiles/apple-clang
- name: Run Conan
env:
CONAN_PROFILE: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
run: |
conan install . \
-of "${BUILD_DIR}" \
-b missing \
-s "build_type=${BUILD_TYPE}" \
-o "&:tests=True" \
--profile:all "${CONAN_PROFILE}"
- name: Run CMake
run: |
cmake \
-B "${BUILD_DIR}" \
-S . \
-G Ninja \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
- name: Build
run: ninja
working-directory: ${{ env.BUILD_DIR }}
- name: Run tests
run: ctest --output-on-failure
working-directory: ${{ env.BUILD_DIR }}