mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
Compare commits
7 Commits
890279b15e
...
2f25cb60c7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f25cb60c7 | ||
|
|
8c8a7ff3b8 | ||
|
|
16493abd0d | ||
|
|
3dd72d94e1 | ||
|
|
5e914abf29 | ||
|
|
9603968808 | ||
|
|
0124c06a53 |
14
.github/actions/build-clio/action.yml
vendored
14
.github/actions/build-clio/action.yml
vendored
@@ -5,19 +5,19 @@ inputs:
|
|||||||
targets:
|
targets:
|
||||||
description: Space-separated build target names
|
description: Space-separated build target names
|
||||||
default: all
|
default: all
|
||||||
subtract_threads:
|
nproc_subtract:
|
||||||
description: An option for the action get-threads-number.
|
description: The number of processors to subtract when calculating parallelism.
|
||||||
required: true
|
required: true
|
||||||
default: "0"
|
default: "0"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Get number of threads
|
- name: Get number of processors
|
||||||
uses: ./.github/actions/get-threads-number
|
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
|
||||||
id: number_of_threads
|
id: nproc
|
||||||
with:
|
with:
|
||||||
subtract_threads: ${{ inputs.subtract_threads }}
|
subtract: ${{ inputs.nproc_subtract }}
|
||||||
|
|
||||||
- name: Build targets
|
- name: Build targets
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -27,5 +27,5 @@ runs:
|
|||||||
cd build
|
cd build
|
||||||
cmake \
|
cmake \
|
||||||
--build . \
|
--build . \
|
||||||
--parallel "${{ steps.number_of_threads.outputs.threads_number }}" \
|
--parallel "${{ steps.nproc.outputs.nproc }}" \
|
||||||
--target ${CMAKE_TARGETS}
|
--target ${CMAKE_TARGETS}
|
||||||
|
|||||||
2
.github/actions/code-coverage/action.yml
vendored
2
.github/actions/code-coverage/action.yml
vendored
@@ -24,7 +24,7 @@ runs:
|
|||||||
-j8 --exclude-throw-branches
|
-j8 --exclude-throw-branches
|
||||||
|
|
||||||
- name: Archive coverage report
|
- name: Archive coverage report
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: coverage-report.xml
|
name: coverage-report.xml
|
||||||
path: build/coverage_report.xml
|
path: build/coverage_report.xml
|
||||||
|
|||||||
38
.github/actions/get-threads-number/action.yml
vendored
38
.github/actions/get-threads-number/action.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
name: Get number of threads
|
|
||||||
description: Determines number of threads to use on macOS and Linux
|
|
||||||
|
|
||||||
inputs:
|
|
||||||
subtract_threads:
|
|
||||||
description: How many threads to subtract from the calculated number
|
|
||||||
required: true
|
|
||||||
default: "0"
|
|
||||||
outputs:
|
|
||||||
threads_number:
|
|
||||||
description: Number of threads to use
|
|
||||||
value: ${{ steps.number_of_threads_export.outputs.num }}
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- name: Get number of threads on mac
|
|
||||||
id: mac_threads
|
|
||||||
if: ${{ runner.os == 'macOS' }}
|
|
||||||
shell: bash
|
|
||||||
run: echo "num=$(($(sysctl -n hw.logicalcpu) - 2))" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Get number of threads on Linux
|
|
||||||
id: linux_threads
|
|
||||||
if: ${{ runner.os == 'Linux' }}
|
|
||||||
shell: bash
|
|
||||||
run: echo "num=$(($(nproc) - 2))" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Shift and export number of threads
|
|
||||||
id: number_of_threads_export
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
SUBTRACT_THREADS: ${{ inputs.subtract_threads }}
|
|
||||||
run: |
|
|
||||||
num_of_threads="${{ steps.mac_threads.outputs.num || steps.linux_threads.outputs.num }}"
|
|
||||||
shift_by="${SUBTRACT_THREADS}"
|
|
||||||
shifted="$((num_of_threads - shift_by))"
|
|
||||||
echo "num=$(( shifted > 1 ? shifted : 1 ))" >> $GITHUB_OUTPUT
|
|
||||||
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
@@ -91,19 +91,6 @@ updates:
|
|||||||
prefix: "ci: [DEPENDABOT] "
|
prefix: "ci: [DEPENDABOT] "
|
||||||
target-branch: develop
|
target-branch: develop
|
||||||
|
|
||||||
- package-ecosystem: github-actions
|
|
||||||
directory: .github/actions/get-threads-number/
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
day: monday
|
|
||||||
time: "04:00"
|
|
||||||
timezone: Etc/GMT
|
|
||||||
reviewers:
|
|
||||||
- XRPLF/clio-dev-team
|
|
||||||
commit-message:
|
|
||||||
prefix: "ci: [DEPENDABOT] "
|
|
||||||
target-branch: develop
|
|
||||||
|
|
||||||
- package-ecosystem: github-actions
|
- package-ecosystem: github-actions
|
||||||
directory: .github/actions/git-common-ancestor/
|
directory: .github/actions/git-common-ancestor/
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download Clio binary from artifact
|
- name: Download Clio binary from artifact
|
||||||
if: ${{ inputs.artifact_name != null }}
|
if: ${{ inputs.artifact_name != null }}
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact_name }}
|
name: ${{ inputs.artifact_name }}
|
||||||
path: ./docker/clio/artifact/
|
path: ./docker/clio/artifact/
|
||||||
|
|||||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -116,7 +116,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
|
||||||
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_server_Linux_Release_gcc
|
name: clio_server_Linux_Release_gcc
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/check-libxrpl.yml
vendored
4
.github/workflows/check-libxrpl.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
|||||||
run: strip build/clio_tests
|
run: strip build/clio_tests
|
||||||
|
|
||||||
- name: Upload clio_tests
|
- name: Upload clio_tests
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_tests_check_libxrpl
|
name: clio_tests_check_libxrpl
|
||||||
path: build/clio_tests
|
path: build/clio_tests
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
image: ghcr.io/xrplf/clio-ci:b2be4b51d1d81548ca48e2f2b8f67356b880c96d
|
image: ghcr.io/xrplf/clio-ci:b2be4b51d1d81548ca48e2f2b8f67356b880c96d
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_tests_check_libxrpl
|
name: clio_tests_check_libxrpl
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/clang-tidy.yml
vendored
8
.github/workflows/clang-tidy.yml
vendored
@@ -61,16 +61,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
conan_profile: ${{ env.CONAN_PROFILE }}
|
conan_profile: ${{ env.CONAN_PROFILE }}
|
||||||
|
|
||||||
- name: Get number of threads
|
- name: Get number of processors
|
||||||
uses: ./.github/actions/get-threads-number
|
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
|
||||||
id: number_of_threads
|
id: nproc
|
||||||
|
|
||||||
- name: Run clang-tidy
|
- name: Run clang-tidy
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
shell: bash
|
shell: bash
|
||||||
id: run_clang_tidy
|
id: run_clang_tidy
|
||||||
run: |
|
run: |
|
||||||
run-clang-tidy-${{ env.LLVM_TOOLS_VERSION }} -p build -j "${{ steps.number_of_threads.outputs.threads_number }}" -fix -quiet 1>output.txt
|
run-clang-tidy-${{ env.LLVM_TOOLS_VERSION }} -p build -j "${{ steps.nproc.outputs.nproc }}" -fix -quiet 1>output.txt
|
||||||
|
|
||||||
- name: Fix local includes and clang-format style
|
- name: Fix local includes and clang-format style
|
||||||
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
if: ${{ steps.run_clang_tidy.outcome != 'success' }}
|
||||||
|
|||||||
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-hooks:
|
run-hooks:
|
||||||
uses: XRPLF/actions/.github/workflows/pre-commit.yml@a8d7472b450eb53a1e5228f64552e5974457a21a
|
uses: XRPLF/actions/.github/workflows/pre-commit.yml@34790936fae4c6c751f62ec8c06696f9c1a5753a
|
||||||
with:
|
with:
|
||||||
runs_on: heavy
|
runs_on: heavy
|
||||||
container: '{ "image": "ghcr.io/xrplf/clio-pre-commit:b2be4b51d1d81548ca48e2f2b8f67356b880c96d" }'
|
container: '{ "image": "ghcr.io/xrplf/clio-pre-commit:b2be4b51d1d81548ca48e2f2b8f67356b880c96d" }'
|
||||||
|
|||||||
10
.github/workflows/reusable-build.yml
vendored
10
.github/workflows/reusable-build.yml
vendored
@@ -145,7 +145,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload build time analyze report
|
- name: Upload build time analyze report
|
||||||
if: ${{ inputs.analyze_build_time }}
|
if: ${{ inputs.analyze_build_time }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: build_time_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: build_time_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
path: build_time_report.txt
|
path: build_time_report.txt
|
||||||
@@ -170,28 +170,28 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload clio_server
|
- name: Upload clio_server
|
||||||
if: ${{ inputs.upload_clio_server && !inputs.code_coverage && !inputs.analyze_build_time }}
|
if: ${{ inputs.upload_clio_server && !inputs.code_coverage && !inputs.analyze_build_time }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_server_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: clio_server_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
path: build/clio_server
|
path: build/clio_server
|
||||||
|
|
||||||
- name: Upload clio_tests
|
- name: Upload clio_tests
|
||||||
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time && !inputs.package }}
|
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time && !inputs.package }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
path: build/clio_tests
|
path: build/clio_tests
|
||||||
|
|
||||||
- name: Upload clio_integration_tests
|
- name: Upload clio_integration_tests
|
||||||
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time && !inputs.package }}
|
if: ${{ !inputs.code_coverage && !inputs.analyze_build_time && !inputs.package }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
path: build/clio_integration_tests
|
path: build/clio_integration_tests
|
||||||
|
|
||||||
- name: Upload Clio Linux package
|
- name: Upload Clio Linux package
|
||||||
if: ${{ inputs.package }}
|
if: ${{ inputs.package }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_deb_package_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: clio_deb_package_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
path: build/*.deb
|
path: build/*.deb
|
||||||
|
|||||||
4
.github/workflows/reusable-release.yml
vendored
4
.github/workflows/reusable-release.yml
vendored
@@ -60,7 +60,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
disable_ccache: true
|
disable_ccache: true
|
||||||
|
|
||||||
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: release_artifacts
|
path: release_artifacts
|
||||||
pattern: clio_server_*
|
pattern: clio_server_*
|
||||||
@@ -89,7 +89,7 @@ jobs:
|
|||||||
run: .github/scripts/prepare-release-artifacts.sh release_artifacts
|
run: .github/scripts/prepare-release-artifacts.sh release_artifacts
|
||||||
|
|
||||||
- name: Upload release notes
|
- name: Upload release notes
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: release_notes_${{ inputs.version }}
|
name: release_notes_${{ inputs.version }}
|
||||||
path: "${RUNNER_TEMP}/release_notes.md"
|
path: "${RUNNER_TEMP}/release_notes.md"
|
||||||
|
|||||||
8
.github/workflows/reusable-test.yml
vendored
8
.github/workflows/reusable-test.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# TODO: remove completely when we have fixed all currently existing issues with sanitizers
|
# TODO: remove completely when we have fixed all currently existing issues with sanitizers
|
||||||
SANITIZER_IGNORE_ERRORS: ${{ endsWith(inputs.conan_profile, '.tsan') || inputs.conan_profile == 'clang.asan' || (inputs.conan_profile == 'gcc.asan' && inputs.build_type == 'Release') }}
|
SANITIZER_IGNORE_ERRORS: ${{ endsWith(inputs.conan_profile, '.tsan') || (inputs.conan_profile == 'gcc.asan' && inputs.build_type == 'Release') }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cleanup workspace
|
- name: Cleanup workspace
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload sanitizer report
|
- name: Upload sanitizer report
|
||||||
if: ${{ env.SANITIZER_IGNORE_ERRORS == 'true' && steps.check_report.outputs.found_report == 'true' }}
|
if: ${{ env.SANITIZER_IGNORE_ERRORS == 'true' && steps.check_report.outputs.found_report == 'true' }}
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
with:
|
with:
|
||||||
name: sanitizer_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: sanitizer_report_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
path: .sanitizer-report/*
|
path: .sanitizer-report/*
|
||||||
@@ -144,7 +144,7 @@ jobs:
|
|||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download report artifact
|
- name: Download report artifact
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
|
||||||
with:
|
with:
|
||||||
name: coverage-report.xml
|
name: coverage-report.xml
|
||||||
path: build
|
path: build
|
||||||
|
|||||||
Reference in New Issue
Block a user