From a98cbc8518c59b4e8ff07bf938dbe6b7e9b3770e Mon Sep 17 00:00:00 2001 From: "azure-pipelines[bot]" Date: Tue, 18 Dec 2018 16:11:31 +0000 Subject: [PATCH] Set up CI with Azure Pipelines --- README.md | 2 ++ azure-pipelines.yml | 46 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/README.md b/README.md index 00c2ca9..232ba6a 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ If you don't have a proper clang version installed, it can also be downloaded. For that you need to set `LLVM_DOWNLOAD_OS_NAME`. This is the name of the operating system used on the [LLVM pre-built binary archive](http://releases.llvm.org/download.html#4.0.0), e.g. `x86_64-linux-gnu-ubuntu-16.10` for Ubuntu 16.10. +You can also set `LLVM_DOWNLOAD_URL` to a custom url, to download a specific version or from a mirror. + If you don't have `llvm-config`, you need to pass the locations explictly. For that set the option `LLVM_VERSION_EXPLICIT` to the version you're using, `LIBCLANG_LIBRARY` to the location of the libclang library file, diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..0fc385d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,46 @@ +name: 'CI build' +trigger: + branches: + include: + - master + - feature/* + paths: + exclude: + - README.md + +jobs: + - job: llvm_linux + pool: + vmImage: 'Ubuntu 16.04' + strategy: + matrix: + LLVM4: + IMAGE: 'foonathan/micro_cpp_llvm:llvm4' + LLVM5: + IMAGE: 'foonathan/micro_cpp_llvm:llvm5' + LLVM6: + IMAGE: 'foonathan/micro_cpp_llvm:llvm6' + LLVM7: + IMAGE: 'foonathan/micro_cpp_llvm:llvm7' + steps: + - script: docker run -u root -v "$PWD:/cppast" $(IMAGE) bash -c "cmake /cppast/ && cmake --build . && ctest --output-on-failure" + displayName: "Compiling using $(IMAGE)" + + - job: llvm_macos + pool: + vmImage: 'macOS-10.13' + strategy: + matrix: + LLVM4: + URL: 'http://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-apple-darwin.tar.xz' + LLVM5: + URL: 'http://releases.llvm.org/5.0.2/clang+llvm-5.0.2-x86_64-apple-darwin.tar.xz' + LLVM6: + URL: 'http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-apple-darwin.tar.xz' + LLVM7: + URL: 'http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz' + steps: + - script: | + mkdir build && cd build/ + cmake -DLLVM_DOWNLOAD_URL=$URL ../ && cmake --build . && ctest --output-on-failure + displayName: "Compiling using $(URL)" \ No newline at end of file