Compare commits

...

8 Commits

Author SHA1 Message Date
Bart
a07399d2f1 Merge branch 'develop' into bthomee/ccache 2025-12-04 09:45:00 -05:00
Bart
73ef462422 Merge branch 'develop' into bthomee/ccache 2025-12-04 08:33:02 -05:00
Bart
ac71a5fcc8 Update name of step 2025-12-03 18:16:04 -05:00
Bart
efd2a33ecb Use env var for the ccache dir 2025-12-03 17:54:47 -05:00
Bart
5ca0577739 Cache the ccache dir 2025-12-03 17:41:42 -05:00
Bart
89ea91af5d Update CI images 2025-12-03 17:18:49 -05:00
Bart
30d2f70744 Print ccache statistics 2025-12-03 17:00:52 -05:00
Bart
aec131bcbb ci: Use ccache to cache build objects for speeding up building 2025-12-03 16:50:35 -05:00
3 changed files with 55 additions and 31 deletions

View File

@@ -15,196 +15,196 @@
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "12", "compiler_version": "12",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "13", "compiler_version": "13",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "14", "compiler_version": "14",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "15", "compiler_version": "15",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "16", "compiler_version": "16",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "17", "compiler_version": "17",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "18", "compiler_version": "18",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "19", "compiler_version": "19",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "bookworm", "distro_version": "bookworm",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "20", "compiler_version": "20",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "trixie", "distro_version": "trixie",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "14", "compiler_version": "14",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "trixie", "distro_version": "trixie",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "15", "compiler_version": "15",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "trixie", "distro_version": "trixie",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "20", "compiler_version": "20",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "debian", "distro_name": "debian",
"distro_version": "trixie", "distro_version": "trixie",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "21", "compiler_version": "21",
"image_sha": "0525eae" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "8", "distro_version": "8",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "14", "compiler_version": "14",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "8", "distro_version": "8",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "any", "compiler_version": "any",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "9", "distro_version": "9",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "12", "compiler_version": "12",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "9", "distro_version": "9",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "13", "compiler_version": "13",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "9", "distro_version": "9",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "14", "compiler_version": "14",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "9", "distro_version": "9",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "any", "compiler_version": "any",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "10", "distro_version": "10",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "14", "compiler_version": "14",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "rhel", "distro_name": "rhel",
"distro_version": "10", "distro_version": "10",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "any", "compiler_version": "any",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "jammy", "distro_version": "jammy",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "12", "compiler_version": "12",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "noble", "distro_version": "noble",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "13", "compiler_version": "13",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "noble", "distro_version": "noble",
"compiler_name": "gcc", "compiler_name": "gcc",
"compiler_version": "14", "compiler_version": "14",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "noble", "distro_version": "noble",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "16", "compiler_version": "16",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "noble", "distro_version": "noble",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "17", "compiler_version": "17",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "noble", "distro_version": "noble",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "18", "compiler_version": "18",
"image_sha": "e1782cd" "image_sha": "ca4517d"
}, },
{ {
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "noble", "distro_version": "noble",
"compiler_name": "clang", "compiler_name": "clang",
"compiler_version": "19", "compiler_version": "19",
"image_sha": "e1782cd" "image_sha": "ca4517d"
} }
], ],
"build_type": ["Debug", "Release"], "build_type": ["Debug", "Release"],

View File

@@ -116,6 +116,16 @@ jobs:
${CMAKE_ARGS} \ ${CMAKE_ARGS} \
.. ..
- name: Restore build objects (Linux)
if: ${{ runner.os == 'Linux' }}
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ inputs.config_name }}
- name: Print out ccache statistics before building
run: ccache -s
- name: Build the binary - name: Build the binary
working-directory: ${{ inputs.build_dir }} working-directory: ${{ inputs.build_dir }}
env: env:
@@ -129,14 +139,22 @@ jobs:
--parallel "${BUILD_NPROC}" \ --parallel "${BUILD_NPROC}" \
--target "${CMAKE_TARGET}" --target "${CMAKE_TARGET}"
- name: Print out ccache statistics after building
run: ccache -s
- name: Save build objects (Linux)
if: ${{ runner.os == 'Linux' }}
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ inputs.config_name }}
- name: Upload rippled artifact (Linux) - name: Upload rippled artifact (Linux)
if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }} if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
env:
BUILD_DIR: ${{ inputs.build_dir }}
with: with:
name: rippled-${{ inputs.config_name }} name: rippled-${{ inputs.config_name }}
path: ${{ env.BUILD_DIR }}/rippled path: ${{ inputs.build_dir }}/rippled
retention-days: 3 retention-days: 3
if-no-files-found: error if-no-files-found: error

View File

@@ -2,6 +2,12 @@
setup project-wide compiler settings setup project-wide compiler settings
#]===================================================================] #]===================================================================]
find_program(CCACHE_PATH "ccache")
if (CCACHE_PATH)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}")
message(STATUS "Using ccache: ${CCACHE_PATH}")
endif ()
#[=========================================================[ #[=========================================================[
TODO some/most of these common settings belong in a TODO some/most of these common settings belong in a
toolchain file, especially the ABI-impacting ones toolchain file, especially the ABI-impacting ones