Skip to content

Tpetra: add is_unified_memory_space to Node #513

Tpetra: add is_unified_memory_space to Node

Tpetra: add is_unified_memory_space to Node #513

Workflow file for this run

name: pre-commit-run
on: [pull_request]
permissions:
contents: read
jobs:
pre-commit-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-python@v6
- uses: pre-commit/[email protected]
continue-on-error: true
- run: git diff HEAD > format_patch.txt
- run: if [ "$(cat format_patch.txt)" == "" ] ; then rm format_patch.txt ; else cat format_patch.txt; fi
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
id: upload-artf
if: ${{ hashFiles('format_patch.txt') != '' }}
with:
name: format patch
path: format_patch.txt
- if: ${{ hashFiles('format_patch.txt') != '' }}
run: |
echo "Your PR updated files that did not respect package formatting settings." >> format_patch_message.txt
echo "Please apply the patch given below. Alternatively you can download a patch file [here](${{ steps.upload-artf.outputs.artifact-url }})." >> format_patch_message.txt
echo "<details>" >> format_patch_message.txt
echo "<summary>Patch</summary>" >> format_patch_message.txt
echo "" >> format_patch_message.txt
echo "\`\`\`diff" >> format_patch_message.txt
cat format_patch.txt >> format_patch_message.txt
echo "\`\`\`" >> format_patch_message.txt
echo "</details>" >> format_patch_message.txt
echo "" >> format_patch_message.txt
echo "More details about our use of clang-format and other tools can be found in the [wiki](https://github.com/trilinos/Trilinos/wiki/Clang\%E2\%80\%90format)." >> format_patch_message.txt
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
id: upload-artf-msg
if: ${{ hashFiles('format_patch_message.txt') != '' }}
with:
name: format_patch_message
path: |
format_patch_message.txt
pr_number
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
if: ${{ hashFiles('format_patch.txt') != '' }}
with:
script: |
core.setFailed('Your PR updated files that did not respect package formatting settings. Please download and apply the formatting patch! It is located at the bottom of the summary tab for this workflow and at this link: ${{ steps.upload-artf.outputs.artifact-url }}')