Docker and drone files

This commit is contained in:
Erki 2021-03-07 16:26:08 +02:00
parent 6e27e99735
commit 2ba019373e
6 changed files with 38 additions and 4 deletions

18
.drone.yml Normal file
View File

@ -0,0 +1,18 @@
kind: pipeline
type: docker
name: default
steps:
- name: build and test
pull: never
image: erki/llvm:latest
commands:
- pip3 install --upgrade conan
- conan profile new default --detect
- conan profile update settings.compiler.libcxx=libstdc++11 default
- mkdir build
- cd build
- conan install .. --build=missing
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON
- ninja
- ctest . --output-on-failure

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.17) cmake_minimum_required(VERSION 3.14)
project("C Analyzer") project("C Analyzer")
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}) set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y
RUN apt-get install -y git build-essential cmake ninja-build python3 python3-pip
RUN git clone --depth=1 https://github.com/llvm/llvm-project.git
RUN mkdir /llvm-project/build
WORKDIR /llvm-project/build
RUN cmake ../llvm -G"Ninja" -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
RUN ninja install
WORKDIR /
RUN rm -r /llvm-project

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.17) cmake_minimum_required(VERSION 3.14)
find_package(nlohmann_json REQUIRED) find_package(nlohmann_json REQUIRED)
find_package(Clang REQUIRED) find_package(Clang REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.17) cmake_minimum_required(VERSION 3.14)
find_package(Catch2 REQUIRED) find_package(Catch2 REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.17) cmake_minimum_required(VERSION 3.14)
# LLVM is typically compiled without RTTI. Weird linker errors ensue if # LLVM is typically compiled without RTTI. Weird linker errors ensue if
# you keep RTTI on and try to link. # you keep RTTI on and try to link.