Skip to content
Snippets Groups Projects
Unverified Commit ea523c30 authored by Grigoris Pavlakis's avatar Grigoris Pavlakis Committed by kongr45gpen
Browse files

# This is a combination of 8 commits.

# This is the 1st commit message:
Add the Dockerfile used to generate the image
# This is the commit message #2:

Reenable clang-tidy on new pipeline
# This is the commit message #3:

Fix vera and clang-tidy
# This is the commit message #4:

Update the used Dockerfile to include clang-tidy
# This is the commit message #5:

Clean up commented out stuff from CI configuration
# This is the commit message #6:

Update Dockerfile according to suggestions
# This is the commit message #7:

Fix the virtual package
# This is the commit message #8:

Move update to initialization to ensure latest version of everything
parent b6e68e5a
No related branches found
No related tags found
No related merge requests found
......@@ -14,14 +14,6 @@ stages:
- test
- deploy
#before_script:
# - apt-get update -qq && apt-get -qq -y install python3-pip && python3 -m pip install --upgrade pip
# - python3 -V
# - python3 -m pip --version
# - g++ --version
# - cat /etc/*-release
# - python3 -m pip install gcovr
build:
stage: build
variables:
......@@ -29,9 +21,9 @@ build:
GCC_COLORS: "error=31;1:warning=35;1:note=36;1:range1=32:range2=34:locus=39;1:quote=39;1:fixit-insert=32:fixit-delete=31:diff-filename=39;1:diff-hunk=32:diff-delete=31:diff-insert=32:type-diff=32;1"
CLICOLOR_FORCE: 1 # Necessary for cmake to output colours
script:
# - cmake . -DCMAKE_CXX_FLAGS="-Werror -fdiagnostics-color=always"
# - make -j4
# - make clean
- cmake . -DCMAKE_CXX_FLAGS="-Werror -fdiagnostics-color=always"
- make -j4
- make clean
- cmake . -DCMAKE_CXX_FLAGS="-Wall -Wextra -fdiagnostics-color=always" # Build again, but with more warnings
- make -j4
......@@ -54,8 +46,6 @@ tests:
cppcheck:
stage: build
before_script:
# - echo deb http://deb.debian.org/debian testing main > /etc/apt/sources.list
# - apt-get update -qq && apt-get -t testing install -y cppcheck
- cppcheck --version
script:
- ci/cppcheck.sh
......@@ -63,9 +53,6 @@ cppcheck:
cppcheck-misra:
stage: build
before_script:
# install cppcheck from the testing repos in order to get the latest version
# - echo deb http://deb.debian.org/debian testing main > /etc/apt/sources.list
# - apt-get update -qq && apt-get -t testing install -y cppcheck && apt-get -t testing install -y python3
- cppcheck --version
script:
- ci/cppcheck-misra.sh
......@@ -73,25 +60,18 @@ cppcheck-misra:
vera:
stage: build
before_script:
# - apt-get update -qq && apt-get install -y -qq vera++
- vera++ --version
- sudo cp ci/vera.profile /usr/lib/vera++/profiles/custom
- cp ci/vera.profile /usr/lib/vera++/profiles/custom
script:
- ci/vera.sh
#clang-tidy:
# stage: build
# variables:
# GIT_SUBMODULE_STRATEGY: normal
# TERM: xterm-color
# before_script:
# Installing the `sid` repository to get the latest version of clang
# - echo deb http://deb.debian.org/debian sid main > /etc/apt/sources.list
# - apt-get update -qq && apt-get -t sid install -y -qq clang-tidy-7
# - clang-tidy-7 --version
# script:
# Running with `script` to give clang a tty so that it outputs colours
# - script -c "bash -x ci/clang-tidy.sh"
clang-tidy:
stage: build
variables:
GIT_SUBMODULE_STRATEGY: normal
TERM: xterm-color
script:
- ./ci/clang-tidy.sh
pages:
stage: deploy
......@@ -102,8 +82,6 @@ pages:
- public
variables:
GIT_SUBMODULE_STRATEGY: normal
# script:
# - apt-get install -qq -y doxygen graphviz lcov
script:
- ./ci/pages_deploy.sh
- echo -e "\e[1;36mPublic directory contents\e[0m" && ls -l public/coverage # Print directory contents for debugging
......
# This is the Dockerfile for the lightspot21/acubesat-ci:latest
# Docker image used at the pipeline. Please take care to generate
# and push a new image to the lightspot21/acubesat-ci repo every
# 1-2 weeks in order to ensure that the tools are at the latest version.
#
# P.S. Tag properly your images with --tag lightspot21/acubesat-ci when
# building.
FROM alpine:latest
# Set a new work directory. DO NOT DELETE THE LINE BELOW
WORKDIR /root/
# Set up clang-tidy version 8
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" \
>> /etc/apk/repositories && apk update && \
apk add --no-cache --virtual git-deps git && \
apk add --no-cache build-base cmake && \
git clone --depth=1 https://github.com/llvm/llvm-project.git -b release/8.x && \
cmake \
-DLLVM_ENABLE_PROJECTS="clang-tools-extra;clang" \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DLLVM_TARGETS_TO_BUILD="host" \
-G "Unix Makefiles" ./llvm-project/llvm && \
make -j$(nproc) clang-tidy && mv bin/clang-tidy /usr/bin/clang-tidy && \
rm -rf * && apk del git-deps
# Update package lists and install cmake, cppcheck, doxygen, vera++,
# gcc and lcov with their dependencies
RUN apk add --no-cache findutils python3 python3-dev \
cppcheck doxygen vera++@testing lcov@testing
# Install gcovr
RUN python3 -m pip install gcovr
# Start a new shell
ENTRYPOINT ["/bin/sh", "-c"]
\ No newline at end of file
......@@ -10,6 +10,6 @@
echo -e "\033[0;34mRunning clang-tidy...\033[0m"
cd "$(dirname "$0")"
clang-tidy-7 `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` \
clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` \
-extra-arg=-fcolor-diagnostics -- -std=c++17 -I../inc \
-I/usr/include/c++/7/ -I/usr/include/x86_64-linux-gnu/c++/7 -I../lib/etl/include
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment