Skip to content

Commit a904479

Browse files
committed
change approach to do this the correct way
1 parent d40e976 commit a904479

File tree

2 files changed

+16
-22
lines changed

2 files changed

+16
-22
lines changed

.github/workflows/eamxx-gh-clang-format.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,8 @@ jobs:
109109
"branch." >> "${GITHUB_STEP_SUMMARY}"
110110
echo "Then commit the changes and push to your remote branch." >> "${GITHUB_STEP_SUMMARY}"
111111
echo "" >> "${GITHUB_STEP_SUMMARY}"
112-
echo "For diffs with ***fewer than 10 files***, we also include the text of " \
112+
echo "For diffs with ***fewer than 100 lines***, we also include the text of " \
113113
"the patch file in a collapsed section, below." >> "${GITHUB_STEP_SUMMARY}"
114-
if [[ $(wc -l < diffiles.txt) -lt 10 ]]; then
115-
echo "<details>" >> "${GITHUB_STEP_SUMMARY}"
116-
echo "" >> "${GITHUB_STEP_SUMMARY}"
117-
echo "<summary>" >> "${GITHUB_STEP_SUMMARY}"
118-
echo 'Contents of \`clang-format-patch.diff\`" >> "${GITHUB_STEP_SUMMARY}"
119-
echo "</summary>" >> "${GITHUB_STEP_SUMMARY}"
120-
echo "To apply this version of the patch, save the text to a local file, " \
121-
"and \`git apply <patch-file>\`, etc., as above." >> "${GITHUB_STEP_SUMMARY}"
122-
echo "" >> "${GITHUB_STEP_SUMMARY}"
123-
echo "\`\`\`" >> "${GITHUB_STEP_SUMMARY}"
124-
cat diffiles.txt >> "${GITHUB_STEP_SUMMARY}"
125-
echo "\`\`\`" >> "${GITHUB_STEP_SUMMARY}"
126-
echo "" >> "${GITHUB_STEP_SUMMARY}"
127-
echo "</details>" >> "${GITHUB_STEP_SUMMARY}"
128-
fi
129114
else
130115
echo "status_fail=false" >> "${GITHUB_ENV}"
131116
echo "## Status: \`clang-format\` Check Passed!" > "${GITHUB_STEP_SUMMARY}"
@@ -136,10 +121,21 @@ jobs:
136121
fname="clang-format-patch_${{ github.event.pull_request.number || github.event_name }}-${d_str}.diff"
137122
echo "fname=${fname}" >> "${GITHUB_ENV}"
138123
git diff > "components/eamxx/${fname}"
139-
- name: debug diff
140-
run: |
141-
echo "${fname}"
142-
tail -10 "components/eamxx/${fname}"
124+
if [[ ${status_fail} = true ]] && [[ $(wc -l < "components/eamxx/${fname}") -lt 100 ]]; then
125+
echo "<details>" >> "${GITHUB_STEP_SUMMARY}"
126+
echo "" >> "${GITHUB_STEP_SUMMARY}"
127+
echo "<summary>" >> "${GITHUB_STEP_SUMMARY}"
128+
echo "<b>Contents of</b> <tt>clang-format-patch.diff</tt>" >> "${GITHUB_STEP_SUMMARY}"
129+
echo "</summary>" >> "${GITHUB_STEP_SUMMARY}"
130+
echo "To apply this version of the patch, save the text to a local file, " \
131+
"and <tt>git apply &lt;patch-file&gt;</tt>, etc., as above." >> "${GITHUB_STEP_SUMMARY}"
132+
echo "" >> "${GITHUB_STEP_SUMMARY}"
133+
echo "\`\`\`" >> "${GITHUB_STEP_SUMMARY}"
134+
cat "components/eamxx/${fname}" >> "${GITHUB_STEP_SUMMARY}"
135+
echo "\`\`\`" >> "${GITHUB_STEP_SUMMARY}"
136+
echo "" >> "${GITHUB_STEP_SUMMARY}"
137+
echo "</details>" >> "${GITHUB_STEP_SUMMARY}"
138+
fi
143139
- name: upload diff patch
144140
if: ${{ env.status_fail == 'true' }}
145141
uses: actions/upload-artifact@v4

components/eamxx/src/control/atmosphere_driver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include <ekat_yaml.hpp>
2222
#include <ekat_std_utils.hpp>
2323

24-
// trigger CI
25-
2624
// The global variable fvphyshack is used to help the initial pgN implementation
2725
// work around some current AD constraints. Search the code for "fvphyshack" to
2826
// find blocks that eventually should be removed in favor of a design that

0 commit comments

Comments
 (0)