diff --git a/.github/actions/build_clio/action.yml b/.github/actions/build_clio/action.yml index b116af3d..874fdf3d 100644 --- a/.github/actions/build_clio/action.yml +++ b/.github/actions/build_clio/action.yml @@ -23,4 +23,7 @@ runs: shell: bash run: | cd build - cmake --build . --parallel ${{ steps.number_of_threads.outputs.threads_number }} --target ${{ inputs.targets }} + cmake \ + --build . \ + --parallel ${{ steps.number_of_threads.outputs.threads_number }} \ + --target ${{ inputs.targets }} diff --git a/.github/actions/build_docker_image/action.yml b/.github/actions/build_docker_image/action.yml index 9f347de5..b5206e72 100644 --- a/.github/actions/build_docker_image/action.yml +++ b/.github/actions/build_docker_image/action.yml @@ -29,32 +29,32 @@ runs: steps: - name: Login to DockerHub if: ${{ inputs.push_image == 'true' }} - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #v3.4.0 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: username: ${{ env.DOCKERHUB_USER }} password: ${{ env.DOCKERHUB_PW }} - name: Login to GitHub Container Registry if: ${{ inputs.push_image == 'true' }} - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #v3.4.0 + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ env.GITHUB_TOKEN }} - - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0 + - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 with: cache-image: false - - uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 #v3.10.0 + - uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 #v5.7.0 + - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 id: meta with: images: ${{ inputs.images }} tags: ${{ inputs.tags }} - name: Build and push - uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 #v6.16.0 + uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 with: context: ${{ inputs.directory }} platforms: ${{ inputs.platforms }} @@ -63,7 +63,7 @@ runs: - name: Update DockerHub description if: ${{ inputs.push_image == 'true' }} - uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 #v4.0.2 + uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2 with: username: ${{ env.DOCKERHUB_USER }} password: ${{ env.DOCKERHUB_PW }} diff --git a/.github/actions/code_coverage/action.yml b/.github/actions/code_coverage/action.yml index 94dd0fce..c0db0fe5 100644 --- a/.github/actions/code_coverage/action.yml +++ b/.github/actions/code_coverage/action.yml @@ -1,5 +1,6 @@ name: Generate code coverage report description: Run tests, generate code coverage report and upload it to codecov.io + runs: using: composite steps: diff --git a/.github/actions/create_issue/action.yml b/.github/actions/create_issue/action.yml index d8ac06a1..22db9678 100644 --- a/.github/actions/create_issue/action.yml +++ b/.github/actions/create_issue/action.yml @@ -1,5 +1,6 @@ name: Create an issue description: Create an issue + inputs: title: description: Issue title @@ -15,10 +16,12 @@ inputs: description: Comma-separated list of assignees required: true default: "godexsoft,kuznetsss,PeterChen13579" + outputs: created_issue_id: description: Created issue id value: ${{ steps.create_issue.outputs.created_issue }} + runs: using: composite steps: @@ -27,7 +30,12 @@ runs: shell: bash run: | echo -e '${{ inputs.body }}' > issue.md - gh issue create --assignee '${{ inputs.assignees }}' --label '${{ inputs.labels }}' --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|.*/||') echo "created_issue=$created_issue" >> $GITHUB_OUTPUT rm create_issue.log issue.md diff --git a/.github/actions/generate/action.yml b/.github/actions/generate/action.yml index 8e040967..6c0c017b 100644 --- a/.github/actions/generate/action.yml +++ b/.github/actions/generate/action.yml @@ -1,5 +1,6 @@ name: Run conan and cmake description: Run conan and cmake + inputs: conan_profile: description: Conan profile name @@ -27,7 +28,13 @@ inputs: sanitizer: description: Sanitizer to use required: true - default: "false" # false, tsan, asan or ubsan + default: "false" + choices: + - "false" + - "tsan" + - "asan" + - "ubsan" + runs: using: composite steps: @@ -44,7 +51,17 @@ runs: INTEGRATION_TESTS_OPTION: "${{ inputs.build_integration_tests == 'true' && 'True' || 'False' }}" run: | cd build - conan install .. -of . -b $BUILD_OPTION -s build_type=${{ inputs.build_type }} -o clio:static="${STATIC_OPTION}" -o clio:tests=True -o clio:integration_tests="${INTEGRATION_TESTS_OPTION}" -o clio:lint=False -o clio:coverage="${CODE_COVERAGE}" --profile ${{ inputs.conan_profile }} + conan \ + install .. \ + -of . \ + -b $BUILD_OPTION \ + -s build_type=${{ inputs.build_type }} \ + -o clio:static="${STATIC_OPTION}" \ + -o clio:tests=True \ + -o clio:integration_tests="${INTEGRATION_TESTS_OPTION}" \ + -o clio:lint=False \ + -o clio:coverage="${CODE_COVERAGE}" \ + --profile ${{ inputs.conan_profile }} - name: Run cmake shell: bash @@ -57,4 +74,9 @@ runs: '' }} run: | cd build - cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ${SANITIZER_OPTION} .. -G Ninja + cmake \ + -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ + -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ + ${SANITIZER_OPTION} \ + .. \ + -G Ninja diff --git a/.github/actions/get_number_of_threads/action.yml b/.github/actions/get_number_of_threads/action.yml index 6ddf04a1..b425f221 100644 --- a/.github/actions/get_number_of_threads/action.yml +++ b/.github/actions/get_number_of_threads/action.yml @@ -1,5 +1,6 @@ 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 @@ -9,6 +10,7 @@ outputs: threads_number: description: Number of threads to use value: ${{ steps.number_of_threads_export.outputs.num }} + runs: using: composite steps: diff --git a/.github/actions/git_common_ancestor/action.yml b/.github/actions/git_common_ancestor/action.yml index 8461d1b3..cdc580e5 100644 --- a/.github/actions/git_common_ancestor/action.yml +++ b/.github/actions/git_common_ancestor/action.yml @@ -1,9 +1,11 @@ name: Git common ancestor description: Find the closest common commit + outputs: commit: description: Hash of commit value: ${{ steps.find_common_ancestor.outputs.commit }} + runs: using: composite steps: diff --git a/.github/actions/prepare_runner/action.yml b/.github/actions/prepare_runner/action.yml index 66aa61f8..65bf6166 100644 --- a/.github/actions/prepare_runner/action.yml +++ b/.github/actions/prepare_runner/action.yml @@ -1,9 +1,11 @@ name: Prepare runner description: Install packages, set environment variables, create directories + inputs: disable_ccache: description: Whether ccache should be disabled required: true + runs: using: composite steps: diff --git a/.github/actions/restore_cache/action.yml b/.github/actions/restore_cache/action.yml index bc3a4677..f0dcca81 100644 --- a/.github/actions/restore_cache/action.yml +++ b/.github/actions/restore_cache/action.yml @@ -1,5 +1,6 @@ name: Restore cache description: Find and restores conan and ccache cache + inputs: conan_dir: description: Path to .conan directory @@ -28,6 +29,7 @@ outputs: ccache_cache_hit: description: True if ccache cache has been downloaded value: ${{ steps.ccache_cache.outputs.cache-hit }} + runs: using: composite steps: diff --git a/.github/actions/save_cache/action.yml b/.github/actions/save_cache/action.yml index 37b37eec..51e320ab 100644 --- a/.github/actions/save_cache/action.yml +++ b/.github/actions/save_cache/action.yml @@ -1,5 +1,6 @@ name: Save cache description: Save conan and ccache cache for develop branch + inputs: conan_dir: description: Path to .conan directory @@ -29,6 +30,7 @@ inputs: description: Whether code coverage is on required: true default: "false" + runs: using: composite steps: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30ccde7b..103b1adb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,11 +68,14 @@ jobs: runs-on: heavy container: image: ghcr.io/xrplf/clio-ci:latest + steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: clio_server_Linux_Release_gcc + - name: Compare Config Description shell: bash run: | diff --git a/.github/workflows/build_clio_docker_image.yml b/.github/workflows/build_clio_docker_image.yml index 74db2844..d59c5f4b 100644 --- a/.github/workflows/build_clio_docker_image.yml +++ b/.github/workflows/build_clio_docker_image.yml @@ -47,6 +47,7 @@ jobs: build_and_publish_image: name: Build and publish image runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/build_impl.yml b/.github/workflows/build_impl.yml index 9bd3ae54..32700eee 100644 --- a/.github/workflows/build_impl.yml +++ b/.github/workflows/build_impl.yml @@ -62,7 +62,7 @@ jobs: steps: - name: Clean workdir if: ${{ runner.os == 'macOS' }} - uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce #v1.0 + uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0 - uses: actions/checkout@v4 with: diff --git a/.github/workflows/check_libxrpl.yml b/.github/workflows/check_libxrpl.yml index 62d110eb..a3e5e8fb 100644 --- a/.github/workflows/check_libxrpl.yml +++ b/.github/workflows/check_libxrpl.yml @@ -80,9 +80,11 @@ jobs: needs: [build, run_tests] if: ${{ always() && contains(needs.*.result, 'failure') }} runs-on: ubuntu-latest + permissions: contents: write issues: write + steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/check_pr_title.yml b/.github/workflows/check_pr_title.yml index 3d3fd448..8818e7ab 100644 --- a/.github/workflows/check_pr_title.yml +++ b/.github/workflows/check_pr_title.yml @@ -8,8 +8,9 @@ on: jobs: check_title: runs-on: ubuntu-latest + steps: - - uses: ytanikin/pr-conventional-commits@8267db1bacc237419f9ed0228bb9d94e94271a1d #v1.4.1 + - uses: ytanikin/pr-conventional-commits@8267db1bacc237419f9ed0228bb9d94e94271a1d # v1.4.1 with: task_types: '["build","feat","fix","docs","test","ci","style","refactor","perf","chore"]' add_label: false diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 1ae192be..5b375694 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -24,6 +24,7 @@ jobs: runs-on: heavy container: image: ghcr.io/xrplf/clio-ci:latest + permissions: contents: write issues: write @@ -97,7 +98,7 @@ jobs: List of the issues found: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/ - - uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec #v6.3.0 + - uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0 if: ${{ steps.run_clang_tidy.outcome != 'success' }} with: gpg_private_key: ${{ secrets.ACTIONS_GPG_PRIVATE_KEY }} @@ -107,7 +108,7 @@ jobs: - name: Create PR with fixes if: ${{ steps.run_clang_tidy.outcome != 'success' }} - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8 + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 env: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/clang-tidy_on_fix_merged.yml b/.github/workflows/clang-tidy_on_fix_merged.yml index e78fef59..2b8d2506 100644 --- a/.github/workflows/clang-tidy_on_fix_merged.yml +++ b/.github/workflows/clang-tidy_on_fix_merged.yml @@ -1,4 +1,5 @@ name: Restart clang-tidy workflow + on: push: branches: [develop] diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 09ee35e3..b9dc988d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,6 +24,7 @@ jobs: continue-on-error: true container: image: ghcr.io/xrplf/clio-ci:latest + steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a8b2023d..a57eb734 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -75,9 +75,11 @@ jobs: needs: [build-and-test, nightly_release, build_and_publish_docker_image] if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name != 'pull_request' }} runs-on: ubuntu-latest + permissions: contents: write issues: write + steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index fdd54f52..96ae58a6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,6 +10,7 @@ on: jobs: run-hooks: runs-on: ubuntu-latest + steps: - name: Checkout Repo ⚡️ uses: actions/checkout@v4 diff --git a/.github/workflows/test_impl.yml b/.github/workflows/test_impl.yml index cc9308a2..e0142a35 100644 --- a/.github/workflows/test_impl.yml +++ b/.github/workflows/test_impl.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Clean workdir if: ${{ runner.os == 'macOS' }} - uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce #v1.0 + uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0 - uses: actions/checkout@v4 with: @@ -116,7 +116,7 @@ jobs: steps: - name: Clean workdir if: ${{ runner.os == 'macOS' }} - uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce #v1.0 + uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce # v1.0 - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/update_docker_ci.yml b/.github/workflows/update_docker_ci.yml index 49648e6e..af7d7557 100644 --- a/.github/workflows/update_docker_ci.yml +++ b/.github/workflows/update_docker_ci.yml @@ -27,6 +27,7 @@ jobs: build_and_push: name: Build and push docker image runs-on: [self-hosted, heavy] + steps: - uses: actions/checkout@v4 - uses: ./.github/actions/build_docker_image diff --git a/.github/workflows/upload_coverage_report.yml b/.github/workflows/upload_coverage_report.yml index c087194b..0f45be75 100644 --- a/.github/workflows/upload_coverage_report.yml +++ b/.github/workflows/upload_coverage_report.yml @@ -11,6 +11,7 @@ jobs: upload_report: name: Upload report runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 with: