build the CI logic