move build to a job

depends on #3725

Please review it first