|
26 | 26 | - os: macos-13 |
27 | 27 | image: "" |
28 | 28 | stdlib: libc++ # no libstdc++ on macOS |
| 29 | + mapping_file_opt: '-Xiwyu --mapping_file=$(realpath ./macos.imp)' |
29 | 30 | fail-fast: false |
30 | 31 |
|
31 | 32 | runs-on: ${{ matrix.os }} |
|
73 | 74 | dnf install -y cmake clang pcre-devel |
74 | 75 | dnf install -y libglvnd-devel # fixes missing dependency for Qt in CMake |
75 | 76 | dnf install -y p7zip-plugins # required as fallback for py7zr in Qt installation |
| 77 | + dnf install -y python3-pip # fixes missing pip module in jurplel/install-qt-action |
| 78 | + dnf install -y python3-devel # fixes building of wheels for jurplel/install-qt-action |
76 | 79 | dnf install -y iwyu |
77 | 80 | ln -s iwyu_tool.py /usr/bin/iwyu_tool |
78 | 81 |
|
@@ -104,9 +107,18 @@ jobs: |
104 | 107 | with: |
105 | 108 | version: ${{ env.QT_VERSION }} |
106 | 109 | modules: 'qtcharts' |
| 110 | + setup-python: 'false' |
107 | 111 | install-deps: false |
108 | 112 | cache: true |
109 | 113 |
|
| 114 | + - name: Generate macOS mappings |
| 115 | + if: contains(matrix.os, 'macos') |
| 116 | + run: | |
| 117 | + set -x |
| 118 | +
|
| 119 | + wget https://raw.githubusercontent.com/include-what-you-use/include-what-you-use/master/mapgen/iwyu-mapgen-apple-libc.py |
| 120 | + python3 iwyu-mapgen-apple-libc.py $(xcrun --show-sdk-path)/usr/include > macos.imp |
| 121 | +
|
110 | 122 | - name: Prepare CMake |
111 | 123 | run: | |
112 | 124 | # TODO: why does it build dmake in the next step? |
@@ -134,14 +146,22 @@ jobs: |
134 | 146 | run: | |
135 | 147 | # -isystem/usr/lib/clang/17/include |
136 | 148 | # TODO: remove -stdlib= - it should have been taken from the compilation database |
137 | | - iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments -stdlib=${{ matrix.stdlib }} > iwyu.log |
| 149 | + iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments -stdlib=${{ matrix.stdlib }} ${{ matrix.mapping_file_opt }} > iwyu.log |
138 | 150 |
|
139 | 151 | - uses: actions/upload-artifact@v4 |
140 | 152 | if: success() || failure() |
141 | 153 | with: |
142 | 154 | name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }}) |
143 | 155 | path: ./cmake.output/compile_commands.json |
144 | 156 |
|
| 157 | + - uses: actions/upload-artifact@v4 |
| 158 | + if: ${{ contains(matrix.os, 'macos') && (success() || failure()) }} |
| 159 | + with: |
| 160 | + name: macOS Mappings |
| 161 | + path: | |
| 162 | + ./iwyu-mapgen-apple-libc.py |
| 163 | + ./macos.imp |
| 164 | +
|
145 | 165 | - uses: actions/upload-artifact@v4 |
146 | 166 | if: success() || failure() |
147 | 167 | with: |
@@ -195,6 +215,7 @@ jobs: |
195 | 215 | with: |
196 | 216 | version: ${{ env.QT_VERSION }} |
197 | 217 | modules: 'qtcharts' |
| 218 | + setup-python: 'false' |
198 | 219 | install-deps: false |
199 | 220 | cache: true |
200 | 221 |
|
|
0 commit comments