mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Merge branch 'develop' into ximinez/lending-refactoring-1
This commit is contained in:
35
.github/workflows/check-format.yml
vendored
35
.github/workflows/check-format.yml
vendored
@@ -17,41 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/xrplf/ci/tools-rippled-pre-commit
|
container: ghcr.io/xrplf/ci/tools-rippled-pre-commit
|
||||||
steps:
|
steps:
|
||||||
# The $GITHUB_WORKSPACE and ${{ github.workspace }} might not point to the
|
|
||||||
# same directory for jobs running in containers. The actions/checkout step
|
|
||||||
# is *supposed* to checkout into $GITHUB_WORKSPACE and then add it to
|
|
||||||
# safe.directory (see instructions at https://github.com/actions/checkout)
|
|
||||||
# but that is apparently not happening for some container images. We
|
|
||||||
# therefore preemptively add both directories to safe.directory. See also
|
|
||||||
# https://github.com/actions/runner/issues/2058 for more details.
|
|
||||||
- name: Configure git safe.directory
|
|
||||||
run: |
|
|
||||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
||||||
git config --global --add safe.directory ${{ github.workspace }}
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
- name: Check configuration
|
- name: Prepare runner
|
||||||
run: |
|
uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5
|
||||||
echo 'Checking path.'
|
|
||||||
echo ${PATH} | tr ':' '\n'
|
|
||||||
|
|
||||||
echo 'Checking environment variables.'
|
|
||||||
env | sort
|
|
||||||
|
|
||||||
echo 'Checking pre-commit version.'
|
|
||||||
pre-commit --version
|
|
||||||
|
|
||||||
echo 'Checking clang-format version.'
|
|
||||||
clang-format --version
|
|
||||||
|
|
||||||
echo 'Checking NPM version.'
|
|
||||||
npm --version
|
|
||||||
|
|
||||||
echo 'Checking Node.js version.'
|
|
||||||
node --version
|
|
||||||
|
|
||||||
echo 'Checking prettier version.'
|
|
||||||
prettier --version
|
|
||||||
- name: Format code
|
- name: Format code
|
||||||
run: pre-commit run --show-diff-on-failure --color=always --all-files
|
run: pre-commit run --show-diff-on-failure --color=always --all-files
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
|
|||||||
13
.github/workflows/notify-clio.yml
vendored
13
.github/workflows/notify-clio.yml
vendored
@@ -50,6 +50,10 @@ jobs:
|
|||||||
echo "channel=pr_${{ github.event.pull_request.number }}" >> "${GITHUB_OUTPUT}"
|
echo "channel=pr_${{ github.event.pull_request.number }}" >> "${GITHUB_OUTPUT}"
|
||||||
echo 'Extracting version.'
|
echo 'Extracting version.'
|
||||||
echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}"
|
echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}"
|
||||||
|
- name: Calculate conan reference
|
||||||
|
id: conan_ref
|
||||||
|
run: |
|
||||||
|
echo "conan_ref=${{ steps.generate.outputs.version }}@${{ steps.generate.outputs.user }}/@${{ steps.generate.outputs.channel }}" >> "${GITHUB_OUTPUT}"
|
||||||
- name: Add Conan remote
|
- name: Add Conan remote
|
||||||
run: |
|
run: |
|
||||||
echo "Adding Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
|
echo "Adding Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
|
||||||
@@ -61,10 +65,9 @@ jobs:
|
|||||||
- name: Upload package
|
- name: Upload package
|
||||||
run: |
|
run: |
|
||||||
conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} .
|
conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} .
|
||||||
conan upload --confirm --check --remote=${{ inputs.conan_remote_name }} xrpl/${{ steps.generate.outputs.version }}@${{ steps.generate.outputs.user }}/${{ steps.generate.outputs.channel }}
|
conan upload --confirm --check --remote=${{ inputs.conan_remote_name }} xrpl/${{ steps.conan_ref.outputs.conan_ref }}
|
||||||
outputs:
|
outputs:
|
||||||
channel: ${{ steps.generate.outputs.channel }}
|
conan_ref: ${{ steps.conan_ref.outputs.conan_ref }}
|
||||||
version: ${{ steps.generate.outputs.version }}
|
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
needs: upload
|
needs: upload
|
||||||
@@ -76,5 +79,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
|
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
/repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
|
/repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
|
||||||
-F "client_payload[version]=${{ needs.upload.outputs.version }}@${{ needs.upload.outputs.user }}/${{ needs.upload.outputs.channel }}" \
|
-F "client_payload[conan_ref]=${{ needs.upload.outputs.conan_ref }}" \
|
||||||
-F "client_payload[pr]=${{ github.event.pull_request.number }}"
|
-F "client_payload[pr_url]=${{ github.event.pull_request.html_url }}"
|
||||||
|
|||||||
@@ -1,18 +1,5 @@
|
|||||||
# To run pre-commit hooks, first install pre-commit:
|
# To run pre-commit hooks, first install pre-commit:
|
||||||
# - `pip install pre-commit==${PRE_COMMIT_VERSION}`
|
# - `pip install pre-commit==${PRE_COMMIT_VERSION}`
|
||||||
# - `pip install pre-commit-hooks==${PRE_COMMIT_HOOKS_VERSION}`
|
|
||||||
#
|
|
||||||
# Depending on your system, you can use `brew install` or `apt install` as well
|
|
||||||
# for installing the pre-commit package, but `pip` is needed to install the
|
|
||||||
# hooks; you can also use `pipx` if you prefer.
|
|
||||||
# Next, install the required formatters:
|
|
||||||
# - `pip install clang-format==${CLANG_VERSION}`
|
|
||||||
# - `npm install prettier@${PRETTIER_VERSION}`
|
|
||||||
#
|
|
||||||
# See https://github.com/XRPLF/ci/blob/main/.github/workflows/tools-rippled.yml
|
|
||||||
# for the versions used in the CI pipeline. You will need to have the exact same
|
|
||||||
# versions of the tools installed on your system to produce the same results as
|
|
||||||
# the pipeline.
|
|
||||||
#
|
#
|
||||||
# Then, run the following command to install the git hook scripts:
|
# Then, run the following command to install the git hook scripts:
|
||||||
# - `pre-commit install`
|
# - `pre-commit install`
|
||||||
@@ -20,42 +7,29 @@
|
|||||||
# - `pre-commit run --all-files`
|
# - `pre-commit run --all-files`
|
||||||
# To manually run a specific hook, use:
|
# To manually run a specific hook, use:
|
||||||
# - `pre-commit run <hook_id> --all-files`
|
# - `pre-commit run <hook_id> --all-files`
|
||||||
# To run the hooks against only the files changed in the current commit, use:
|
# To run the hooks against only the staged files, use:
|
||||||
# - `pre-commit run`
|
# - `pre-commit run`
|
||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: mixed-line-ending
|
||||||
|
- id: check-merge-conflict
|
||||||
|
args: [--assume-in-merge]
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
|
rev: 7d85583be209cb547946c82fbe51f4bc5dd1d017 # frozen: v18.1.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
name: clang-format
|
args: [--style=file]
|
||||||
language: system
|
"types_or": [c++, c, proto]
|
||||||
entry: clang-format -i
|
|
||||||
files: '\.(cpp|hpp|h|ipp|proto)$'
|
- repo: https://github.com/rbubley/mirrors-prettier
|
||||||
- id: trailing-whitespace
|
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
|
||||||
name: trailing-whitespace
|
|
||||||
entry: trailing-whitespace-fixer
|
|
||||||
language: system
|
|
||||||
types: [text]
|
|
||||||
- id: end-of-file
|
|
||||||
name: end-of-file
|
|
||||||
entry: end-of-file-fixer
|
|
||||||
language: system
|
|
||||||
types: [text]
|
|
||||||
- id: mixed-line-ending
|
|
||||||
name: mixed-line-ending
|
|
||||||
entry: mixed-line-ending
|
|
||||||
language: system
|
|
||||||
types: [text]
|
|
||||||
- id: check-merge-conflict
|
|
||||||
name: check-merge-conflict
|
|
||||||
entry: check-merge-conflict --assume-in-merge
|
|
||||||
language: system
|
|
||||||
types: [text]
|
|
||||||
- repo: local
|
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
name: prettier
|
|
||||||
language: system
|
|
||||||
entry: prettier --ignore-unknown --write
|
|
||||||
|
|
||||||
exclude: |
|
exclude: |
|
||||||
(?x)^(
|
(?x)^(
|
||||||
|
|||||||
Reference in New Issue
Block a user