General Motors will partner with Andretti Global on a bid to compete in Formula One, the companies said Thursday.