An organisation called Crossrail International, which is owned by the UK government, will carry out the work.
It has also signed a deal with Vietnam to provide similar services there.
Downing Street argues that Africa provides what it calls “unparalleled future opportunities for UK businesses” given half of Africans are under the age of 20 and more than a quarter of the world’s population will live in Africa by 2050.
“I will focus on the deals we can do, the business we can do, with our partner countries and make sure that the work we do internationally is impacting directly at home,” he told reporters on the flight to South Africa.
“If you want to deal with the cost of living and make people better off with good secure jobs, investment from G20 partners and allies is really important,” he added.