diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..96aceacc6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,71 @@ +version: 2 + +# Copyright (C) 2019 LEIDOS. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# + +# Configuration file for Circle CI +# CI will report failure if any executed command returns and error status +# Operations performed are as follows +# Build source code +# Run unit tests for C++ +# Run static code analyzer for SourceCloud +# Upload test results +# Every run command should start with source ${INIT_ENV} to ensure all default dependancies are available +jobs: + build: + # Pull docker image + # XTERM used for better make output + docker: + - image: animeshb27/v2x-hub:v2x-hub-v3.2 + environment: + TERM: xterm + + # Set working directory + working_directory: "/home/V2X-Hub-build" + # Pull code and execute tests | + # Name of each run command defines purpose use + steps: + #setup remote docker + - setup_remote_docker : + docker_layer_caching: true + + + # Checkout PR branch + - checkout: + - run: + name: Pull V2X-Hub + command: | + git clone --depth 1 git@github.com:v2xhub/V2X-Hub.git V2X-Hub + - run: + name: Build tmx + command: | + cd /home/V2X-Hub/src/tmx + cmake . + make + make install + + - run: + name: Build V2i-Hub + command: | + cd /home/V2X-Hub/src/v2i-hub + cmake . + make + + + + + + +