Formula 1 has agreed the next commercial agreement with its teams, including Cadillac's new squad, until 2030.