Global models of planet formation and evolution