variables: AUTOWARE_CROSS_TARGET_PLATFORM: generic-aarch64 .build: &build_common before_script: - mkdir -p src_tmp/${CI_PROJECT_NAME} && mv `find -maxdepth 1 -not -name . -not -name src_tmp` src_tmp/${CI_PROJECT_NAME} && mv src_tmp/ src/ - sudo apt-get update - sudo apt-get install -y wget python3-pip python3-setuptools python3-colcon-common-extensions # Update setuptools from PyPI because the version Ubuntu ships with is too old - pip3 install -U setuptools - rosdep update script: - source /opt/ros/${ROS_DISTRO}/setup.bash - rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} # We first build the entire workspace normally - colcon build --cmake-args -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage" -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage" -DCMAKE_BUILD_TYPE=Debug # And then build the tests target. catkin (ROS1) packages add their tests to the tests target # which is not the standard target for CMake projects. We need to trigger the tests target so that # tests are built and any fixtures are set up. - colcon build --cmake-target tests --cmake-args -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage" -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage" -DCMAKE_BUILD_TYPE=Debug - colcon test - colcon test-result --verbose .build_cross_vars: &build_cross_vars AUTOWARE_TARGET_ARCH: aarch64 AUTOWARE_TOOLCHAIN_FILE_PATH: $CI_PROJECT_DIR/cross_toolchain.cmake AUTOWARE_SYSROOT: /sysroot/${AUTOWARE_CROSS_TARGET_PLATFORM} .build_cross: &build_cross_common script: - apt-get update && apt-get install -y python3-vcstool git build-essential wget - wget https://gitlab.com/autowarefoundation/autoware.ai/docker/raw/master/crossbuild/cross_toolchain.cmake - source ${AUTOWARE_SYSROOT}/opt/ros/${ROS_DISTRO}/setup.bash - colcon build --merge-install --cmake-args -DCMAKE_TOOLCHAIN_FILE=${AUTOWARE_TOOLCHAIN_FILE_PATH} -DCMAKE_SYSTEM_PROCESSOR=${AUTOWARE_TARGET_ARCH} -DCMAKE_PREFIX_PATH="${CI_PROJECT_DIR}/install;${AUTOWARE_SYSROOT}/opt/ros/${ROS_DISTRO}" -DCMAKE_FIND_ROOT_PATH=${CI_PROJECT_DIR}/install build_melodic: image: autoware/autoware:bleedingedge-melodic-base <<: *build_common only: - merge_requests - master build_melodic_arm: tags: - arm64 image: autoware/arm64v8:bleedingedge-melodic-base <<: *build_common only: - branches@autowarefoundation/autoware.ai/messages build_melodic_cross: image: autoware/build:${AUTOWARE_CROSS_TARGET_PLATFORM}-melodic-bleedingedge variables: ROS_DISTRO: melodic <<: *build_cross_vars <<: *build_cross_common only: - merge_requests - master