Gather packages by 3 to reduce number of jobs

This commit is contained in:
Maxime Gimeno 2017-01-13 17:07:05 +01:00
parent a227eb920d
commit 470640bff6
4 changed files with 120 additions and 184 deletions

View File

@ -3,123 +3,45 @@ dist: trusty
sudo: required sudo: required
env: env:
matrix: matrix:
- PACKAGE='AABB_tree' - PACKAGE='AABB_tree Advancing_front_surface_reconstruction Algebraic_foundations '
- PACKAGE='Advancing_front_surface_reconstruction' - PACKAGE='Algebraic_kernel_d Algebraic_kernel_for_circles Algebraic_kernel_for_spheres '
- PACKAGE='Algebraic_foundations' - PACKAGE='Alpha_shapes_2 Alpha_shapes_3 Apollonius_graph_2 '
- PACKAGE='Algebraic_kernel_d' - PACKAGE='Arithmetic_kernel Arrangement_on_surface_2 Barycentric_coordinates_2 '
- PACKAGE='Algebraic_kernel_for_circles' - PACKAGE='BGL Boolean_set_operations_2 Bounding_volumes '
- PACKAGE='Algebraic_kernel_for_spheres' - PACKAGE='Box_intersection_d CGAL_ImageIO CGAL_ipelets '
- PACKAGE='Alpha_shapes_2' - PACKAGE='Circular_kernel_2 Circular_kernel_3 Circulator '
- PACKAGE='Alpha_shapes_3' - PACKAGE='Combinatorial_map Cone_spanners_2 Convex_decomposition_3 '
- PACKAGE='Apollonius_graph_2' - PACKAGE='Convex_hull_2 Convex_hull_3 Convex_hull_d '
- PACKAGE='Arithmetic_kernel' - PACKAGE='Distance_2 Distance_3 Envelope_2 '
- PACKAGE='Arrangement_on_surface_2' - PACKAGE='Envelope_3 Filtered_kernel Generalized_map '
- PACKAGE='Barycentric_coordinates_2' - PACKAGE='Generator Geomview GraphicsView '
- PACKAGE='BGL' - PACKAGE='HalfedgeDS Hash_map Inscribed_areas '
- PACKAGE='Boolean_set_operations_2' - PACKAGE='Installation Interpolation Intersections_2 '
- PACKAGE='Bounding_volumes' - PACKAGE='Intersections_3 Interval_skip_list Interval_support '
- PACKAGE='Box_intersection_d' - PACKAGE='Inventor Jet_fitting_3 Kernel_23 '
- PACKAGE='CGAL_ImageIO' - PACKAGE='Kernel_d Kinetic_data_structures Kinetic_framework '
- PACKAGE='CGAL_ipelets' - PACKAGE='Linear_cell_complex Matrix_search Mesh_2 '
- PACKAGE='Circular_kernel_2' - PACKAGE='Mesh_3 Minkowski_sum_2 Minkowski_sum_3 '
- PACKAGE='Circular_kernel_3' - PACKAGE='Modifier Modular_arithmetic Nef_2 '
- PACKAGE='Circulator' - PACKAGE='Nef_3 Nef_S2 NewKernel_d '
- PACKAGE='Combinatorial_map' - PACKAGE='Number_types Operations_on_polyhedra Optimal_transportation_reconstruction_2 '
- PACKAGE='Cone_spanners_2' - PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_triangulation_3 '
- PACKAGE='Convex_decomposition_3' - PACKAGE='Point_set_2 Point_set_3 Point_set_processing_3 '
- PACKAGE='Convex_hull_2' - PACKAGE='Point_set_shape_detection_3 Poisson_surface_reconstruction_3 Polygon '
- PACKAGE='Convex_hull_3' - PACKAGE='Polygon_mesh_processing Polyhedron Polyhedron_IO '
- PACKAGE='Convex_hull_d' - PACKAGE='Polyline_simplification_2 Polynomial Polytope_distance_d '
- PACKAGE='Distance_2' - PACKAGE='Principal_component_analysis Profiling_tools QP_solver '
- PACKAGE='Distance_3' - PACKAGE='Random_numbers Ridges_3 Scale_space_reconstruction_3 '
- PACKAGE='Envelope_2' - PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Skin_surface_3 '
- PACKAGE='Envelope_3' - PACKAGE='Snap_rounding_2 Solver_interface Spatial_searching '
- PACKAGE='Filtered_kernel' - PACKAGE='Spatial_sorting STL_Extension Straight_skeleton_2 '
- PACKAGE='Generalized_map' - PACKAGE='Stream_lines_2 Stream_support Subdivision_method_3 '
- PACKAGE='Generator' - PACKAGE='Surface_mesh Surface_mesh_deformation Surface_mesher '
- PACKAGE='Geomview' - PACKAGE='Surface_mesh_parameterization Surface_mesh_segmentation Surface_mesh_shortest_path '
- PACKAGE='GraphicsView' - PACKAGE='Surface_mesh_simplification Surface_mesh_skeletonization Sweep_line_2 '
- PACKAGE='HalfedgeDS' - PACKAGE='TDS_2 TDS_3 Three '
- PACKAGE='Hash_map' - PACKAGE='Triangulation Triangulation_2 Triangulation_3 '
- PACKAGE='Inscribed_areas' - PACKAGE='Union_find Visibility_2 Voronoi_diagram_2 '
- PACKAGE='Installation'
- PACKAGE='Interpolation'
- PACKAGE='Intersections_2'
- PACKAGE='Intersections_3'
- PACKAGE='Interval_skip_list'
- PACKAGE='Interval_support'
- PACKAGE='Inventor'
- PACKAGE='Jet_fitting_3'
- PACKAGE='Kernel_23'
- PACKAGE='Kernel_d'
- PACKAGE='Kinetic_data_structures'
- PACKAGE='Kinetic_framework'
- PACKAGE='Linear_cell_complex'
- PACKAGE='Matrix_search'
- PACKAGE='Mesh_2'
- PACKAGE='Mesh_3'
- PACKAGE='Minkowski_sum_2'
- PACKAGE='Minkowski_sum_3'
- PACKAGE='Modifier'
- PACKAGE='Modular_arithmetic'
- PACKAGE='Nef_2'
- PACKAGE='Nef_3'
- PACKAGE='Nef_S2'
- PACKAGE='NewKernel_d'
- PACKAGE='Number_types'
- PACKAGE='Operations_on_polyhedra'
- PACKAGE='Optimal_transportation_reconstruction_2'
- PACKAGE='Partition_2'
- PACKAGE='Periodic_2_triangulation_2'
- PACKAGE='Periodic_3_triangulation_3'
- PACKAGE='Point_set_2'
- PACKAGE='Point_set_3'
- PACKAGE='Point_set_processing_3'
- PACKAGE='Point_set_shape_detection_3'
- PACKAGE='Poisson_surface_reconstruction_3'
- PACKAGE='Polygon'
- PACKAGE='Polygon_mesh_processing'
- PACKAGE='Polyhedron'
- PACKAGE='Polyhedron_IO'
- PACKAGE='Polyline_simplification_2'
- PACKAGE='Polynomial'
- PACKAGE='Polytope_distance_d'
- PACKAGE='Principal_component_analysis'
- PACKAGE='Profiling_tools'
- PACKAGE='QP_solver'
- PACKAGE='Random_numbers'
- PACKAGE='Ridges_3'
- PACKAGE='Scale_space_reconstruction_3'
- PACKAGE='Segment_Delaunay_graph_2'
- PACKAGE='Segment_Delaunay_graph_Linf_2'
- PACKAGE='Skin_surface_3'
- PACKAGE='Snap_rounding_2'
- PACKAGE='Solver_interface'
- PACKAGE='Spatial_searching'
- PACKAGE='Spatial_sorting'
- PACKAGE='STL_Extension'
- PACKAGE='Straight_skeleton_2'
- PACKAGE='Stream_lines_2'
- PACKAGE='Stream_support'
- PACKAGE='Subdivision_method_3'
- PACKAGE='Surface_mesh'
- PACKAGE='Surface_mesh_deformation'
- PACKAGE='Surface_mesher'
- PACKAGE='Surface_mesh_parameterization'
- PACKAGE='Surface_mesh_segmentation'
- PACKAGE='Surface_mesh_shortest_path'
- PACKAGE='Surface_mesh_simplification'
- PACKAGE='Surface_mesh_skeletonization'
- PACKAGE='Sweep_line_2'
- PACKAGE='TDS_2'
- PACKAGE='TDS_3'
- PACKAGE='Three'
- PACKAGE='Triangulation'
- PACKAGE='Triangulation_2'
- PACKAGE='Triangulation_3'
- PACKAGE='Union_find'
- PACKAGE='Visibility_2'
- PACKAGE='Voronoi_diagram_2'
- PACKAGE='CHECK' - PACKAGE='CHECK'
install: install:
before_script: before_script:
@ -129,6 +51,7 @@ before_script:
- make - make
- cd .. - cd ..
script: script:
- cd ./.travis
- bash -x -e ./build_package.sh $PACKAGE - bash -x -e ./build_package.sh $PACKAGE
compiler: compiler:
- clang - clang

View File

@ -1,27 +1,11 @@
#!/bin/bash #!/bin/bash
set -e set -e
EXAMPLES="$1/examples/$1" IFS=$' '
TEST="$1/test/$1" ROOT="$PWD/../"
DEMO="$1/demo/$1" for ARG in $(echo "$@")
ROOT="$PWD" do
if [ -d "$ROOT/$EXAMPLES" ] if [ "$ARG" == "CHECK" ]
then then
cd $ROOT/$EXAMPLES
mkdir -p build
cd build
cmake -DCGAL_DIR="$ROOT/build" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" ..
make -j2
fi
if [ -d "$ROOT/$TEST" ]
then
cd $ROOT/$TEST
mkdir -p build
cd build
cmake -DCGAL_DIR="$ROOT/build" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" ..
make -j2
fi
if [ "$1" == "CHECK" ]
then
#parse current matrix and check that no package has been forgotten #parse current matrix and check that no package has been forgotten
old_IFS=$IFS old_IFS=$IFS
IFS=$'\n' IFS=$'\n'
@ -51,14 +35,34 @@ then
exit 1 exit 1
fi fi
echo "Matrix is up to date." echo "Matrix is up to date."
fi
exit 0 exit 0
fi
EXAMPLES="$ARG/examples/$ARG"
TEST="$ARG/test/$ARG"
DEMO="$ARG/demo/$ARG"
if [ -d "$ROOT/$EXAMPLES" ]
then
cd $ROOT/$EXAMPLES
mkdir -p build
cd build
cmake -DCGAL_DIR="$ROOT/build" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" ..
make -j2
fi
if [ -d "$ROOT/$TEST" ]
then
cd $ROOT/$TEST
mkdir -p build
cd build
cmake -DCGAL_DIR="$ROOT/build" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" ..
make -j2
fi
#if [ "$1" != Polyhedron ] #if [ "$ARG" != Polyhedron ]
#then #then
# cd $ROOT/$DEMO # cd $ROOT/$DEMO
# mkdir -p build # mkdir -p build
# cd build # cd build
# cmake -DCGAL_DIR="$ROOT/build" .. # cmake -DCGAL_DIR="$ROOT/build" ..
# make # make
#fi #fi
done

View File

@ -9,11 +9,20 @@ fi
#find all the packages #find all the packages
PACKAGES=() PACKAGES=()
INDEX=0
i=0
for f in * for f in *
do do
if [ -d "$f/examples/$f" ] || [ -d "$f/test/$f" ] || [ -d "$f/demo/$f" ] if [ -d "$f/examples/$f" ] || [ -d "$f/test/$f" ] || [ -d "$f/demo/$f" ]
then then
PACKAGES+="$f " PACKAGES[$INDEX]+="$f "
i=$[i+1]
if [ $i == 3 ]
then
i=0
#PACKAGES[$INDEX]+="\n"
INDEX=$[INDEX+1]
fi
echo "$f " >> ./.travis/packages.txt echo "$f " >> ./.travis/packages.txt
fi fi
done done
@ -37,14 +46,13 @@ do
fi fi
done done
echo " matrix: " >> .travis.yml echo " matrix: " >> .travis.yml
IFS=$' '
#writes the matrix #writes the matrix
for package in ${PACKAGES[@]} for package in ${PACKAGES[@]}
do do
echo " - PACKAGE='$package' " >> .travis.yml echo " - PACKAGE='$package' " >> .travis.yml
done done
echo " - PACKAGE='CHECK' " >> .travis.yml echo " - PACKAGE='CHECK' " >> .travis.yml
IFS=$'\n'
#writes the end of the file #writes the end of the file
COPY=0 COPY=0
for LINE in $(cat "$PWD/.travis/template.txt") for LINE in $(cat "$PWD/.travis/template.txt")

View File

@ -12,6 +12,7 @@ before_script:
- make - make
- cd .. - cd ..
script: script:
- cd ./.travis
- bash -x -e ./build_package.sh $PACKAGE - bash -x -e ./build_package.sh $PACKAGE
compiler: compiler:
- clang - clang