Skip to content

Commit b0c5abd

Browse files
authored
Try to fix ids check workflow
1 parent e986879 commit b0c5abd

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/ids-check.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,28 @@ jobs:
7474
7575
- name: Run ids over compilation database
7676
run: |
77-
set -e
7877
cd ${{ github.workspace }}/llvm-project
7978
export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/**/*.h' ':!llvm/include/llvm/Debuginfod/' ':!llvm/include/llvm/Demangle/' )
80-
echo $H_OR_CPP_FILES_CHANGED_LAST_COMMIT
8179
if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
8280
for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
83-
echo $file
84-
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
81+
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --inplace --export-macro=LLVM_ABI --include-header="llvm/include/llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
8582
done
8683
fi
8784
export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm-c/**/*.h' )
88-
echo $H_OR_CPP_FILES_CHANGED_LAST_COMMIT
8985
if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
9086
for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
91-
echo $file
92-
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
87+
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --inplace --export-macro=LLVM_C_ABI --include-header="llvm/include/llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
9388
done
9489
fi
9590
export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/Demangle/**/*.h' )
96-
echo $H_OR_CPP_FILES_CHANGED_LAST_COMMIT
9791
if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
9892
for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
99-
echo $file
100-
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
93+
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --inplace --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
10194
done
10295
fi
96+
git diff --quiet
97+
if [ $? -ne 0 ]; then
98+
echo "Apply the following diff to fix the LLVM_ABI annotations"
99+
git diff
100+
exit 1
101+
fi

0 commit comments

Comments
 (0)