travis: split testing from building (cherry picked from commit 2f4e7cb0e8c21cc2d673946eddf9278c2863427b)