The progenitors of compact-object binaries: impact of metallicity, common envelope and natal kicks