ABI.Initialize gives a helpful message when the TypeOffset interop class is not configured correctly by tminka · Pull Request #1340 · pythonnet/pythonnet

I have restored the lines that you mentioned, and the same tests fail. So I don't think that was the problem. Also, if you look at the output of the "Build and Install" step, ubuntu 3.6 prints Creating src/runtime/interop36m.cs but ubuntu 3.8 and 3.9 do not. Therefore they are not generating any interop file. Also, if you read setup.py you will see that it always creates the interop file in src\runtime, so it is not possible for the file to be generated outside src\runtime folder.

Perhaps the reason that no interop file is generated is because sys.abiflags was changed in 3.8 to be an empty string. Indeed, MacOS does not generate an interop file for Python 3.8 either. The reason that the "MacOS, 3.8" build succeeds is that the embedded tests were skipped. Maybe "ubuntu, 3.8" should also skip the embedded tests.