mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
Flow to check new libXRPL version (#1433)
This commit is contained in:
10
.github/actions/create_issue/action.yml
vendored
10
.github/actions/create_issue/action.yml
vendored
@@ -7,6 +7,14 @@ inputs:
|
|||||||
body:
|
body:
|
||||||
description: Issue body
|
description: Issue body
|
||||||
required: true
|
required: true
|
||||||
|
labels:
|
||||||
|
description: Comma-separated list of labels
|
||||||
|
required: true
|
||||||
|
default: 'bug'
|
||||||
|
assignees:
|
||||||
|
description: Comma-separated list of assignees
|
||||||
|
required: true
|
||||||
|
default: 'cindyyan317,godexsoft,kuznetsss'
|
||||||
outputs:
|
outputs:
|
||||||
created_issue_id:
|
created_issue_id:
|
||||||
description: Created issue id
|
description: Created issue id
|
||||||
@@ -19,7 +27,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo -e '${{ inputs.body }}' > issue.md
|
echo -e '${{ inputs.body }}' > issue.md
|
||||||
gh issue create --assignee 'cindyyan317,godexsoft,kuznetsss' --label bug --title '${{ inputs.title }}' --body-file ./issue.md > create_issue.log
|
gh issue create --assignee '${{ inputs.assignees }}' --label '${{ inputs.labels }}' --title '${{ inputs.title }}' --body-file ./issue.md > create_issue.log
|
||||||
created_issue=$(cat create_issue.log | sed 's|.*/||')
|
created_issue=$(cat create_issue.log | sed 's|.*/||')
|
||||||
echo "created_issue=$created_issue" >> $GITHUB_OUTPUT
|
echo "created_issue=$created_issue" >> $GITHUB_OUTPUT
|
||||||
rm create_issue.log issue.md
|
rm create_issue.log issue.md
|
||||||
|
|||||||
28
.github/scripts/update-libxrpl-version
vendored
Executable file
28
.github/scripts/update-libxrpl-version
vendored
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Note: This script is intended to be run from the root of the repository.
|
||||||
|
#
|
||||||
|
# This script modifies conanfile.py such that the specified version of libXRPL is used.
|
||||||
|
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
ERROR
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
Version should be passed as first argument to the script.
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
GNU_SED=$(sed --version 2>&1 | grep -q 'GNU' && echo true || echo false)
|
||||||
|
|
||||||
|
echo "+ Updating required libXRPL version to $VERSION"
|
||||||
|
|
||||||
|
if [[ "$GNU_SED" == "false" ]]; then
|
||||||
|
sed -i '' -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/$VERSION'|g" conanfile.py
|
||||||
|
else
|
||||||
|
sed -i -E "s|'xrpl/[a-zA-Z0-9\\.\\-]+'|'xrpl/$VERSION'|g" conanfile.py
|
||||||
|
fi
|
||||||
91
.github/workflows/check_libxrpl.yml
vendored
Normal file
91
.github/workflows/check_libxrpl.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
name: Check new libXRPL
|
||||||
|
on:
|
||||||
|
repository_dispatch:
|
||||||
|
types: [check_libxrpl]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Clio / `libXRPL ${{ github.event.client_payload.version }}`
|
||||||
|
runs-on: [self-hosted, heavy]
|
||||||
|
container:
|
||||||
|
image: rippleci/clio_ci:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Update libXRPL version requirement
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
./.github/scripts/update-libxrpl-version ${{ github.event.client_payload.version }}
|
||||||
|
|
||||||
|
- name: Prepare runner
|
||||||
|
uses: ./.github/actions/prepare_runner
|
||||||
|
with:
|
||||||
|
disable_ccache: true
|
||||||
|
|
||||||
|
- name: Setup conan
|
||||||
|
uses: ./.github/actions/setup_conan
|
||||||
|
id: conan
|
||||||
|
with:
|
||||||
|
conan_profile: gcc
|
||||||
|
|
||||||
|
- name: Run conan and cmake
|
||||||
|
uses: ./.github/actions/generate
|
||||||
|
with:
|
||||||
|
conan_profile: ${{ steps.conan.outputs.conan_profile }}
|
||||||
|
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
|
||||||
|
build_type: Release
|
||||||
|
|
||||||
|
- name: Build Clio
|
||||||
|
uses: ./.github/actions/build_clio
|
||||||
|
|
||||||
|
- name: Strip tests
|
||||||
|
run: strip build/clio_tests
|
||||||
|
|
||||||
|
- name: Upload clio_tests
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_tests_libxrpl-${{ github.event.client_payload.version }}
|
||||||
|
path: build/clio_tests
|
||||||
|
|
||||||
|
run_tests:
|
||||||
|
name: Run tests
|
||||||
|
needs: build
|
||||||
|
runs-on: [self-hosted, heavy]
|
||||||
|
container:
|
||||||
|
image: rippleci/clio_ci:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: clio_tests_libxrpl-${{ github.event.client_payload.version }}
|
||||||
|
|
||||||
|
- name: Run clio_tests
|
||||||
|
run: |
|
||||||
|
chmod +x ./clio_tests
|
||||||
|
./clio_tests
|
||||||
|
|
||||||
|
create_issue_on_failure:
|
||||||
|
name: Create an issue on failure
|
||||||
|
needs: [build, run_tests]
|
||||||
|
if: ${{ always() && contains(needs.*.result, 'failure') }}
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create an issue
|
||||||
|
uses: ./.github/actions/create_issue
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
labels: 'compatibility,bug'
|
||||||
|
title: 'Proposed libXRPL check failed'
|
||||||
|
body: >
|
||||||
|
Clio build or tests failed against `libXRPL ${{ github.event.client_payload.version }}`.
|
||||||
|
|
||||||
|
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/
|
||||||
Reference in New Issue
Block a user