Replace Travis with Github Actions for CI builds

Replace Travis for continuous integration with Github Actions.
The Github Actions pipeline is functionally equivalent, with
all the same build permutations supported.
Whilst the Github Actions offering is broadly equivalent to
Travis, a few changes have been made as part of the migration.

- The 'core' and 'optional' Travis stages have been consolidated
into one build matrix. This is due to the current inability in
Github Actions to share build steps between jobs, so this avoids
having to duplicate the steps.
Optional stage jobs will now run in parallel with core jobs,
but they still remain optional in the sense that they don't fail
the build.

- A number of existing Github Action plugins are used to replace
functionality provided by Travis or other tools:
Node setup, caching, Codecov, publishing release artifacts.

- Linux builds are updated to build on Ubuntu 18.04.
MacOS builds are updated to run on 10.15. Similar to the
Travis Xenial upgrade attempt, some changes are required due
to underlying platform and compiler upgrades. This means some
Node 10 toolchains will no longer be supported.

Whilst there is opportunity to upgrade some dependencies and
make the CI steps more idiomatic, I've left this for future changes
and just focussed on functional replication.
This commit is contained in:
Michael Bell
2021-06-24 18:59:15 +01:00
committed by Patrick Niklaus
parent 8af4f700f7
commit eb0c089574
19 changed files with 612 additions and 615 deletions
+2 -3
View File
@@ -6,7 +6,6 @@
#include "engine/api/json_factory.hpp"
#include "osrm/coordinate.hpp"
#include <iterator>
#include <vector>
using namespace osrm;
@@ -27,7 +26,7 @@ BOOST_AUTO_TEST_CASE(test_json_linestring)
const auto coords = geom.values["coordinates"].get<util::json::Array>().values;
BOOST_CHECK_EQUAL(coords.size(), 3); // array of three location arrays
for (const auto each : coords)
for (const auto &each : coords)
{
const auto loc = each.get<util::json::Array>().values;
BOOST_CHECK_EQUAL(loc.size(), 2);
@@ -53,7 +52,7 @@ BOOST_AUTO_TEST_CASE(test_json_single_point)
const auto coords = geom.values["coordinates"].get<util::json::Array>().values;
BOOST_CHECK_EQUAL(coords.size(), 2); // array of two location arrays
for (const auto each : coords)
for (const auto &each : coords)
{
const auto loc = each.get<util::json::Array>().values;
BOOST_CHECK_EQUAL(loc.size(), 2);
+1 -1
View File
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(test_match_fb_serialization)
const auto matchings = fb->routes();
const auto &number_of_matchings = matchings->size();
for (const auto &waypoint : *waypoints)
for (const auto waypoint : *waypoints)
{
BOOST_CHECK(waypoint_check(waypoint));
const auto matchings_index = waypoint->matchings_index();
+1 -1
View File
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_fb_serialization)
auto waypoints = fb->waypoints();
BOOST_CHECK(waypoints->size() > 0); // the dataset has at least one nearest coordinate
for (const auto &waypoint : *waypoints)
for (const auto waypoint : *waypoints)
{
BOOST_CHECK(waypoint->distance() >= 0);
BOOST_CHECK(waypoint->nodes()->first() != 0);
+5 -5
View File
@@ -263,7 +263,7 @@ void test_route_same_coordinates(bool use_json_only_api)
const auto &entries = intersection_object.at("entry").get<json::Array>().values;
BOOST_CHECK(bearings.size() == entries.size());
for (const auto bearing : bearings)
for (const auto &bearing : bearings)
BOOST_CHECK(0. <= bearing.get<json::Number>().value &&
bearing.get<json::Number>().value <= 360.);
@@ -619,7 +619,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb)
const auto waypoints = fb->waypoints();
BOOST_CHECK(waypoints->size() == params.coordinates.size());
for (const auto &waypoint : *waypoints)
for (const auto waypoint : *waypoints)
{
const auto longitude = waypoint->location()->longitude();
const auto latitude = waypoint->location()->latitude();
@@ -633,7 +633,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb)
const auto routes = fb->routes();
BOOST_REQUIRE_GT(routes->size(), 0);
for (const auto &route : *routes)
for (const auto route : *routes)
{
BOOST_CHECK_EQUAL(route->distance(), 0);
BOOST_CHECK_EQUAL(route->duration(), 0);
@@ -641,7 +641,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb)
const auto &legs = route->legs();
BOOST_CHECK(legs->size() > 0);
for (const auto &leg : *legs)
for (const auto leg : *legs)
{
BOOST_CHECK_EQUAL(leg->distance(), 0);
@@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb_skip_waypoints)
const auto routes = fb->routes();
BOOST_REQUIRE_GT(routes->size(), 0);
for (const auto &route : *routes)
for (const auto route : *routes)
{
BOOST_CHECK_EQUAL(route->distance(), 0);
BOOST_CHECK_EQUAL(route->duration(), 0);
+2 -2
View File
@@ -332,14 +332,14 @@ BOOST_AUTO_TEST_CASE(test_table_serialiaze_fb)
// check destinations array of waypoint objects
const auto &destinations_array = fb->table()->destinations();
BOOST_CHECK_EQUAL(destinations_array->size(), params.destinations.size());
for (const auto &destination : *destinations_array)
for (const auto destination : *destinations_array)
{
BOOST_CHECK(waypoint_check(destination));
}
// check sources array of waypoint objects
const auto &sources_array = fb->waypoints();
BOOST_CHECK_EQUAL(sources_array->size(), params.sources.size());
for (const auto &source : *sources_array)
for (const auto source : *sources_array)
{
BOOST_CHECK(waypoint_check(source));
}
+1 -1
View File
@@ -525,7 +525,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_fb_serialization)
const auto trips = fb->routes();
BOOST_CHECK_EQUAL(trips->size(), 1);
for (const auto &waypoint : *waypoints)
for (const auto waypoint : *waypoints)
{
const auto longitude = waypoint->location()->longitude();
const auto latitude = waypoint->location()->latitude();