Are you using any -C options to choose the target cpu? It could really be encountering instructions that the CI computers don't understand, if they're older.
The other time SIGILL comes up is with the ud2 instruction, which is a reserved "undefined" instruction that LLVM uses to trap some undefined behavior. But if it's working locally, this seems less likely.
SIGILL is handled by the OS. Perhaps syslog will have more info?
Otherwise you'd need to run the rustc process under a debugger to catch the signal. Adding --verbose will make cargo print rustc invocations, which you could try copying and running via debugger.
I didn't have the syslog as it was in GitHub Action runs. I was wondering if it's related to rust-cache I used in GitHub Action. After I disabled the cache, the SIGILL is gone, for now. But I don't have real evidence that's the reason.
( I used to see SIGILL in cargo test and later changed the ordering of the cache action and rust toolchain action, which seemed helped.)