forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'OSGeo:main' into master
- Loading branch information
Showing
12 changed files
with
157 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ libpdal-dev | |
libpng-dev | ||
libproj-dev | ||
libreadline-dev | ||
libsvm-dev | ||
libzstd-dev | ||
pdal | ||
proj-bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,88 @@ on: | |
- main | ||
- releasebranch_* | ||
pull_request: | ||
branches: | ||
- main | ||
- releasebranch_* | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref_protected != true }} | ||
permissions: {} | ||
jobs: | ||
formatting-check: | ||
name: Formatting Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
- name: Run clang-format style check for C/C++/Protobuf programs. | ||
uses: jidicula/[email protected] | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
persist-credentials: false | ||
- uses: DoozyX/clang-format-lint-action@11b773b1598aa4ae3b32f023701bca5201c3817d # v0.17 | ||
with: | ||
source: "." | ||
clangFormatVersion: 15 | ||
inplace: True | ||
- name: Verify Changed files | ||
uses: tj-actions/verify-changed-files@d774a4c7ebe335445d79c7b44138f56a76058ba0 # v19.0.0 | ||
id: verify-changed-files | ||
- id: git-changed-files | ||
run: | | ||
{ | ||
echo 'CHANGED_FILES<<EOF' | ||
git ls-files --other --modified --exclude-standard | ||
echo EOF | ||
} >> "$GITHUB_OUTPUT" | ||
- name: List all changed files tracked and untracked files | ||
run: | | ||
echo "Changed files: ${{ steps.git-changed-files.outputs.CHANGED_FILES }}" | ||
- name: Add job summary without changed files | ||
if: ${{ steps.verify-changed-files.outputs.files_changed == 'false' }} | ||
run: | | ||
{ | ||
echo "### Changed files:" | ||
echo "No files were changed by clang-format" | ||
} >> "$GITHUB_STEP_SUMMARY" | ||
- name: Add job summary with changed files | ||
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }} | ||
run: | | ||
{ | ||
echo '### Changed files:' | ||
echo '```' | ||
echo "${CHANGED_FILES}" | ||
echo '```' | ||
} >> "$GITHUB_STEP_SUMMARY" | ||
env: | ||
CHANGED_FILES: ${{ steps.git-changed-files.outputs.CHANGED_FILES }} | ||
- name: Create unified diff of changes | ||
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }} | ||
run: git diff --unified=0 --no-color --output=diff-clang-format.patch | ||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }} | ||
with: | ||
name: diff | ||
if-no-files-found: ignore | ||
retention-days: 1 | ||
path: | | ||
diff-clang-format.patch | ||
- name: Add note to summary explaining that code suggestions will be applied if it is a PR | ||
if: ${{ (github.event_name == 'pull_request') && (steps.verify-changed-files.outputs.files_changed == 'true') }} | ||
run: | | ||
{ | ||
echo '' | ||
echo 'Suggestions can only be added near to lines changed in this PR.' | ||
echo 'If any fixes can be added as code suggestions, they will be added shortly from another workflow.' | ||
} >> "$GITHUB_STEP_SUMMARY" | ||
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
if: always() | ||
with: | ||
clang-format-version: '15' | ||
check-path: . | ||
name: formatted-clang-format | ||
retention-days: 10 | ||
path: | | ||
.clang-format | ||
${{ steps.git-changed-files.outputs.CHANGED_FILES }} | ||
- name: Explain that more files need to be fixed | ||
if: ${{ steps.verify-changed-files.outputs.files_changed == 'true' }} | ||
run: | | ||
{ | ||
echo '' | ||
# shellcheck disable=SC2016 | ||
echo 'All fixed files are included in the `formatted-*` artifact. This artifact can be downloaded and copied to the repository to replace unformatted files with the formatted files.' | ||
} >> "$GITHUB_STEP_SUMMARY" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
name: Post PR code suggestions | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["ClangFormat Check"] | ||
types: | ||
- completed | ||
permissions: {} | ||
jobs: | ||
post-suggestions: | ||
runs-on: ubuntu-latest | ||
# Only run on failures, since no changes are needed on success | ||
if: > | ||
(github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.conclusion == 'failure') | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Create a .git directory needed by reviewdog | ||
run: git init | ||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | ||
id: diff | ||
continue-on-error: true | ||
with: | ||
name: diff | ||
github-token: ${{ github.token }} | ||
run-id: ${{github.event.workflow_run.id }} | ||
- uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0 | ||
- run: | | ||
GITHUB_ACTIONS="" reviewdog \ | ||
-name="${INPUT_TOOL_NAME:-reviewdog-suggester}" \ | ||
-f=diff \ | ||
-f.diff.strip=1 \ | ||
-filter-mode=nofilter \ | ||
-guess \ | ||
-reporter="github-pr-review" < "${TMPFILE}" | ||
env: | ||
TMPFILE: diff-clang-format.patch | ||
INPUT_TOOL_NAME: clang-format | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CI_COMMIT: ${{ github.event.workflow_run.head_sha }} | ||
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }} | ||
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }} | ||
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters