Commit 3411f06b authored by Pádraig Ó Conbhuí's avatar Pádraig Ó Conbhuí
Browse files

Add CI

Change Log:
* Add missing <atomic> header
parent 0a1aacf6
Pipeline #1225 passed with stages
in 3 minutes and 18 seconds
.job_defaults:
image: ubuntu:19.04
tags:
- docker
stages:
- Static Analysis
- Dynamic Analysis
include:
- "/tests/ci/format-ci.yml"
- "/tests/ci/lint-ci.yml"
- "/tests/ci/dynamic-analysis-ci.yml"
......@@ -2,6 +2,7 @@
#define PERFORATE_TRACE_HPP
#include <algorithm>
#include <atomic>
#include <cassert>
#include <chrono>
#include <cinttypes>
......
.dynamic_analysis_job:
extends: .job_defaults
stage: Dynamic Analysis
before_script:
- apt-get update
- apt-get install -y
cmake
g++ clang
script:
- cmake -B build
-DCMAKE_CXX_COMPILER=${CXX}
-DCMAKE_VERBOSE_MAKEFILE=ON
- cmake --build build
- cmake --build build --target test -- ARGS=-V
gcc:
extends: .dynamic_analysis_job
variables:
CXX: g++
clang:
extends: .dynamic_analysis_job
variables:
CXX: clang++
Format:
extends: .job_defaults
stage: Static Analysis
before_script:
- apt-get update
- apt-get install -y
clang-format
git
script:
- ./tools/format.sh
&& git status --porcelain
&& git diff-index --quiet HEAD
|| {
echo;
echo "This commit contains unformatted files!";
echo "Run tools/format.sh on the project to format them correctly.";
echo;
false;
}
Lint:
extends: .job_defaults
stage: Static Analysis
before_script:
- apt-get update
- apt-get install -y
clang
clang-tidy
cmake
script:
- cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- ./tools/lint.sh -p=build
......@@ -127,9 +127,7 @@ then
echo_verbose "Linting: ${target_file}"
# Run clang-tidy!
"${CLANG_TIDY_EXECUTABLE}" "${clang_tidy_options[@]}" "${target_file}"
exit 0
exec "${CLANG_TIDY_EXECUTABLE}" "${clang_tidy_options[@]}" "${target_file}"
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment