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
1 change: 0 additions & 1 deletion .github/actions/xahau-ga-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ runs:
${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-${{ inputs.main_branch }}
${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ inputs.configuration }}-
${{ runner.os }}-ccache-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-
${{ runner.os }}-ccache-v${{ inputs.cache_version }}-

- name: Configure project
shell: bash
Expand Down
7 changes: 3 additions & 4 deletions .github/actions/xahau-ga-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ runs:
restore-keys: |
${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-${{ hashFiles('**/conanfile.txt', '**/conanfile.py') }}-
${{ runner.os }}-conan-v${{ inputs.cache_version }}-${{ inputs.compiler-id }}-
${{ runner.os }}-conan-v${{ inputs.cache_version }}-

- name: Export custom recipes
shell: bash
run: |
conan export external/snappy snappy/1.1.9@
conan export external/soci soci/4.0.3@
conan export external/snappy snappy/1.1.10@xahaud/stable
conan export external/soci soci/4.0.3@xahaud/stable

- name: Install dependencies
shell: bash
Expand All @@ -83,4 +82,4 @@ runs:
path: |
~/.conan
~/.conan2
key: ${{ steps.cache-restore-conan.outputs.cache-primary-key }}
key: ${{ steps.cache-restore-conan.outputs.cache-primary-key }}
Original file line number Diff line number Diff line change
@@ -1,48 +1,53 @@
name: Release - SH Runner
name: Build using Docker

on:
push:
branches: [ "dev", "candidate", "release", "jshooks"]
branches: ["dev", "candidate", "release", "jshooks"]
pull_request:
branches: [ "dev", "candidate", "release", "jshooks"]
branches: ["dev", "candidate", "release", "jshooks"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DEBUG_CONTAINERS: 1
REMOVE_CONTAINERS: 0
DEBUG_BUILD_CONTAINERS_AFTER_CLEANUP: 1

jobs:
build-and-test:
checkout:
runs-on: [self-hosted, vanity]
outputs:
checkout_path: ${{ steps.vars.outputs.checkout_path }}
steps:
- name: Prepare workspace
- name: Prepare checkout path
id: vars
run: |
SAFE_BRANCH=$(echo "${{ github.ref_name }}" | sed -e 's/[^a-zA-Z0-9._-]/-/g')
CHECKOUT_PATH="${SAFE_BRANCH}-${{ github.sha }}"
echo "CHECKOUT_PATH=${CHECKOUT_PATH}" >> $GITHUB_ENV
mkdir -p "$CHECKOUT_PATH"
echo "checkout_path=${CHECKOUT_PATH}" >> "$GITHUB_OUTPUT"

- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
path: ${{ env.CHECKOUT_PATH }}
path: ${{ steps.vars.outputs.checkout_path }}
clean: true
fetch-depth: 2
fetch-depth: 2 # Only get the last 2 commits, to avoid fetching all history

build:
runs-on: [self-hosted, vanity]
needs: [checkout]
defaults:
run:
working-directory: ${{ needs.checkout.outputs.checkout_path }}
steps:
- name: Set Cleanup Script Path
run: |
echo "JOB_CLEANUP_SCRIPT=$(mktemp)" >> $GITHUB_ENV

- name: Build using Docker
working-directory: ${{ env.CHECKOUT_PATH }}
run: /bin/bash release-builder.sh

- name: Stop Container (Cleanup after build)
- name: Stop Container (Cleanup)
if: always()
working-directory: ${{ env.CHECKOUT_PATH }}
run: |
echo "Running cleanup script: $JOB_CLEANUP_SCRIPT"
/bin/bash -e -x "$JOB_CLEANUP_SCRIPT"
Expand All @@ -56,30 +61,35 @@ jobs:
echo "⚠️ Cleanup script failed! Keeping for debugging: $JOB_CLEANUP_SCRIPT"
fi

if [[ "${DEBUG_CONTAINERS}" == "1" ]]; then
if [[ "${DEBUG_BUILD_CONTAINERS_AFTER_CLEANUP}" == "1" ]]; then
echo "🔍 Checking for leftover containers..."
BUILD_CONTAINERS=$(docker ps --format '{{.Names}}' | grep '^xahaud_cached_builder' || echo "")
CONTAINER_NAME="xahaud_cached_builder_${{ github.workflow }}-${{ github.ref_name }}"
if [[ -n "$BUILD_CONTAINERS" && "${REMOVE_CONTAINERS}" == "1" ]]; then

if [[ -n "$BUILD_CONTAINERS" ]]; then
echo "⚠️ WARNING: Some build containers are still running"
echo "$BUILD_CONTAINERS"
echo "Attempting to stop build containers.."
echo "Stopping container: $CONTAINER_NAME"
docker stop "$CONTAINER_NAME" || echo "Failed to stop container: $CONTAINER_NAME"
echo "Removing container: $CONTAINER_NAME"
docker rm -f "$CONTAINER_NAME" || echo "Failed to remove container: $CONTAINER_NAME"
echo "✅ Build container stopped and removed"
else
echo "✅ No build containers found"
fi
fi

- name: Run unit tests
working-directory: ${{ env.CHECKOUT_PATH }}
tests:
runs-on: [self-hosted, vanity]
needs: [build, checkout]
defaults:
run:
working-directory: ${{ needs.checkout.outputs.checkout_path }}
steps:
- name: Unit tests
run: /bin/bash docker-unit-tests.sh

cleanup:
runs-on: [self-hosted, vanity]
needs: [tests, checkout]
if: always()
steps:
- name: Cleanup workspace
if: always()
run: |
CHECKOUT_PATH="${{ needs.checkout.outputs.checkout_path }}"
echo "Cleaning workspace for ${CHECKOUT_PATH}"
rm -rf "${{ github.workspace }}/${CHECKOUT_PATH}"
19 changes: 8 additions & 11 deletions .github/workflows/xahau-ga-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
configuration: [Debug]
include:
- compiler: gcc
cc: gcc-11
cxx: g++-11
compiler_id: gcc-11
cc: gcc-13
cxx: g++-13
compiler_id: gcc-13
compiler_version: 13
env:
build_dir: .build
# Bump this number to invalidate all caches globally.
CACHE_VERSION: 1
CACHE_VERSION: 2
MAIN_BRANCH_NAME: dev
steps:
- name: Checkout
Expand Down Expand Up @@ -58,12 +59,8 @@ jobs:
conan profile update env.CXX=/usr/bin/${{ matrix.cxx }} default
conan profile update conf.tools.build:compiler_executables='{"c": "/usr/bin/${{ matrix.cc }}", "cpp": "/usr/bin/${{ matrix.cxx }}"}' default

# Set correct compiler version based on matrix.compiler
if [ "${{ matrix.compiler }}" = "gcc" ]; then
conan profile update settings.compiler.version=11 default
elif [ "${{ matrix.compiler }}" = "clang" ]; then
conan profile update settings.compiler.version=14 default
fi
# Set compiler version from matrix
conan profile update settings.compiler.version=${{ matrix.compiler_version }} default
# Display profile for verification
conan profile show default

Expand Down Expand Up @@ -120,4 +117,4 @@ jobs:
else
echo "Error: rippled executable not found in ${{ env.build_dir }}"
exit 1
fi
fi
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ bin/project-cache.jam

build/docker

# Ignore release builder files
.env
release-build
cmake-*.tar.gz

# Ignore object files.
*.o
build
Expand Down
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ can't build earlier Boost versions.
which allows you to statically link it with GCC, if you want.

```
conan export external/snappy snappy/1.1.9@
conan export external/snappy snappy/1.1.10@xahaud/stable
```

5. Export our [Conan recipe for SOCI](./external/soci).
It patches their CMake to correctly import its dependencies.

```
conan export external/soci soci/4.0.3@
conan export external/soci soci/4.0.3@xahaud/stable
```

### Build and Test
Expand Down
5 changes: 5 additions & 0 deletions Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,11 @@ target_link_libraries (rippled
Ripple::opts
Ripple::libs
Ripple::xrpl_core
# Workaround for a Conan 1.x bug that prevents static linking of libstdc++
# when a dependency (snappy) modifies system_libs. See the comment in
# external/snappy/conanfile.py for a full explanation.
# This is likely not strictly necessary, but listed explicitly as a good practice.
m
)
exclude_if_included (rippled)
# define a macro for tests that might need to
Expand Down
33 changes: 0 additions & 33 deletions Builds/CMake/RippledNIH.cmake

This file was deleted.

52 changes: 0 additions & 52 deletions Builds/CMake/conan/Boost.cmake

This file was deleted.

22 changes: 0 additions & 22 deletions Builds/CMake/conan/Protobuf.cmake

This file was deleted.

Loading
Loading