@@ -13,22 +13,39 @@ jobs:
1313 runs-on : ubuntu-22.04
1414
1515 container :
16- image : " debian:unstable " # use latest debian image to get latest include-what-you-get
16+ image : " archlinux: latest"
1717
1818 steps :
1919 - uses : actions/checkout@v3
2020
2121 # TODO: the necessary packages are excessive - mostly because of Qt - use a pre-built image
22- - name : Install missing software
22+ - name : Install missing software on debian/ubuntu
23+ if : false
2324 run : |
2425 apt-get update
2526 apt-get install -y cmake g++ make libpcre3-dev
2627 apt-get install -y qtbase5-dev qttools5-dev libqt5charts5-dev
2728 apt-get install -y wget iwyu
29+ ln -s ../x86_64-linux-gnu/qt5 /usr/include/qt
30+
31+ - name : Install missing software on archlinux
32+ run : |
33+ set -x
34+ pacman -Sy
35+ pacman -S cmake make gcc qt5-base qt5-tools qt5-charts pcre wget --noconfirm
36+ pacman-key --init
37+ pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com
38+ pacman-key --lsign-key FBA220DFC880C036
39+ pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' --noconfirm
40+ echo "[chaotic-aur]" >> /etc/pacman.conf
41+ echo "Include = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf
42+ pacman -Sy
43+ pacman -S include-what-you-use --noconfirm
44+ ln -s iwyu-tool /usr/sbin/iwyu_tool
2845
2946 - name : Prepare CMake
3047 run : |
31- cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DBUILD_TESTS=On -DBUILD_GUI=On - DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off
48+ cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off
3249
3350 - name : Prepare CMake dependencies
3451 run : |
@@ -46,26 +63,27 @@ jobs:
4663 - name : Build Qt mappings
4764 run : |
4865 wget https://raw.githubusercontent.com/include-what-you-use/include-what-you-use/master/mapgen/iwyu-mapgen-qt.py
49- python3 iwyu-mapgen-qt.py /usr/include/x86_64-linux-gnu/qt5 / > qt5.imp
66+ python3 iwyu-mapgen-qt.py /usr/include/qt / > qt5.imp
5067
51- # TODO: the mapping file causes a massive slowdown so we cannot use it at the moment.
52- # add "-Xiwyu --mapping_file=qt5.imp" at the end of the whole command if we can use them.
5368 - name : iwyu_tool
5469 run : |
55- # do not fail for now so the output is being saved
56- iwyu_tool -p cmake.output -j $(nproc) -- -w > iwyu.log || true
70+ PWD=$(pwd)
71+ iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --mapping_file=$PWD/qt5.imp > iwyu.log
5772
5873 - uses : actions/upload-artifact@v3
74+ if : success() || failure()
5975 with :
6076 name : Compilation Database
6177 path : ./cmake.output/compile_commands.json
6278
6379 - uses : actions/upload-artifact@v3
80+ if : success() || failure()
6481 with :
6582 name : Qt Mappings
6683 path : ./qt5.imp
6784
6885 - uses : actions/upload-artifact@v3
86+ if : success() || failure()
6987 with :
7088 name : Logs (include-what-you-use)
7189 path : ./*.log
0 commit comments