@@ -26,87 +26,14 @@ jobs:
2626 runs-on : ubuntu-latest
2727 if : github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch'
2828 container :
29- image : ghcr.io/seqan/clang-18
29+ image : ghcr.io/seqan/clang-19
3030 volumes :
3131 - /home/runner:/home/runner
3232 steps :
33- - name : Checkout
34- uses : actions/checkout@v4
33+ - name : Run IWYU
34+ uses : seqan/ actions/iwyu@main
3535 with :
36- path : hibf
36+ configure_path : test/all
3737 token : ${{ secrets.SEQAN_ACTIONS_PAT }}
38-
39- - name : Build IWYU
40- run : |
41- mkdir iwyu && cd iwyu
42- git clone https://github.com/include-what-you-use/include-what-you-use.git --branch 0.22
43- mkdir build && cd build
44- cmake ../include-what-you-use -G "Unix Makefiles" \
45- -DCMAKE_BUILD_TYPE=Release \
46- -DCMAKE_INSTALL_PREFIX=/usr \
47- -DCMAKE_PREFIX_PATH=/usr/lib/llvm-18 \
48- -DCMAKE_C_COMPILER=clang-18 \
49- -DCMAKE_CXX_COMPILER=clang++-18
50- make -j
51- make install
52-
53- - name : Configure Test
54- run : |
55- mkdir build && cd build
56- cmake ../hibf/test/iwyu -DCMAKE_BUILD_TYPE=Debug
57-
58- - name : Run Test
59- working-directory : build
60- run : |
61- ccache -z
62- make -j 2> out.txt
63- ccache -sv
64-
65- - name : Apply changes
66- working-directory : build
67- run : |
68- fix_includes.py --nosafe_headers \
69- --comments \
70- --noreorder \
71- --ignore_re ".*/include/hibf/contrib/.*" < out.txt
72-
73- - name : Add changes
74- id : changed_files
75- working-directory : hibf
76- run : |
77- git add .
78- CPP_LIST=$(git diff --name-only HEAD | { grep -E "(\.cpp|\.hpp)$" || test $? = 1; } | xargs)
79- echo "cpp_list=$CPP_LIST" >> $GITHUB_OUTPUT
80-
81- - name : Run clang-format
82- if : ${{ steps.changed_files.outputs.cpp_list }}
83- working-directory : hibf
84- run : |
85- clang-format-18 --style=file -i ${{ steps.changed_files.outputs.cpp_list }}
86- git add .
87-
88- - name : Import GPG key
89- if : ${{ steps.changed_files.outputs.cpp_list }}
90- uses : crazy-max/ghaction-import-gpg@v6
91- with :
92- gpg_private_key : ${{ secrets.SEQAN_ACTIONS_GPG_KEY }}
93- passphrase : ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }}
94- git_user_signingkey : true
95- git_commit_gpgsign : true
96- workdir : hibf
97-
98- - name : Open PR
99- if : ${{ steps.changed_files.outputs.cpp_list }}
100- uses : peter-evans/create-pull-request@v7
101- with :
102- token : ${{ secrets.SEQAN_ACTIONS_PAT }}
103- path : hibf
104- commit-message : " [MISC] IWYU"
105- committer : " seqan-actions[bot] <seqan-actions@users.noreply.github.com>"
106- author : " seqan-actions[bot] <seqan-actions@users.noreply.github.com>"
107- branch : " actions/iwyu"
108- delete-branch : true
109- title : " [MISC] IWYU"
110- body : " Auto-generated include-what-you-use changes"
111-
112-
38+ gpg_key : ${{ secrets.SEQAN_ACTIONS_GPG_KEY }}
39+ gpg_passphrase : ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }}
0 commit comments