Skip to content

Commit 8c8a7ff

Browse files
authored
ci: Use XRPLF/get-nproc (#2727)
1 parent 16493ab commit 8c8a7ff

File tree

4 files changed

+11
-62
lines changed

4 files changed

+11
-62
lines changed

.github/actions/build-clio/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ inputs:
55
targets:
66
description: Space-separated build target names
77
default: all
8-
subtract_threads:
9-
description: An option for the action get-threads-number.
8+
nproc_subtract:
9+
description: The number of processors to subtract when calculating parallelism.
1010
required: true
1111
default: "0"
1212

1313
runs:
1414
using: composite
1515
steps:
16-
- name: Get number of threads
17-
uses: ./.github/actions/get-threads-number
18-
id: number_of_threads
16+
- name: Get number of processors
17+
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
18+
id: nproc
1919
with:
20-
subtract_threads: ${{ inputs.subtract_threads }}
20+
subtract: ${{ inputs.nproc_subtract }}
2121

2222
- name: Build targets
2323
shell: bash
@@ -27,5 +27,5 @@ runs:
2727
cd build
2828
cmake \
2929
--build . \
30-
--parallel "${{ steps.number_of_threads.outputs.threads_number }}" \
30+
--parallel "${{ steps.nproc.outputs.nproc }}" \
3131
--target ${CMAKE_TARGETS}

.github/actions/get-threads-number/action.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,6 @@ updates:
9191
prefix: "ci: [DEPENDABOT] "
9292
target-branch: develop
9393

94-
- package-ecosystem: github-actions
95-
directory: .github/actions/get-threads-number/
96-
schedule:
97-
interval: weekly
98-
day: monday
99-
time: "04:00"
100-
timezone: Etc/GMT
101-
reviewers:
102-
- XRPLF/clio-dev-team
103-
commit-message:
104-
prefix: "ci: [DEPENDABOT] "
105-
target-branch: develop
106-
10794
- package-ecosystem: github-actions
10895
directory: .github/actions/git-common-ancestor/
10996
schedule:

.github/workflows/clang-tidy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ jobs:
6161
with:
6262
conan_profile: ${{ env.CONAN_PROFILE }}
6363

64-
- name: Get number of threads
65-
uses: ./.github/actions/get-threads-number
66-
id: number_of_threads
64+
- name: Get number of processors
65+
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
66+
id: nproc
6767

6868
- name: Run clang-tidy
6969
continue-on-error: true
7070
shell: bash
7171
id: run_clang_tidy
7272
run: |
73-
run-clang-tidy-${{ env.LLVM_TOOLS_VERSION }} -p build -j "${{ steps.number_of_threads.outputs.threads_number }}" -fix -quiet 1>output.txt
73+
run-clang-tidy-${{ env.LLVM_TOOLS_VERSION }} -p build -j "${{ steps.nproc.outputs.nproc }}" -fix -quiet 1>output.txt
7474
7575
- name: Fix local includes and clang-format style
7676
if: ${{ steps.run_clang_tidy.outcome != 'success' }}

0 commit comments

Comments
 (0)