MSVC builds unusable slow

I’ve setup CI builds for a rather large project. There are actions to build it with GCC (in two variants) and with MSVC. The GCC builds usually finish in about 3 hours, but the MSVC build is killed after the timeout at 6 hours. Did I configure something wrong? The workflow file is here: https://github.com/startaq/mame/blob/master/.github/workflows/ccpp.yml (Note: Linux builds commented out but they build in about 2.5 hours) The last log with successful GCC and failed MSVC build is here: https://github.com/startaq/mame/commit/4346a9c36d16fc1d5dc9034cbe4a379cf10434bb/checks?check_suite_id=259452802