浏览代码

gitlab-ci: add initial clang-tidy build

Ben Boeckel 5 年之前
父节点
当前提交
0866b9253b
共有 1 个文件被更改,包括 65 次插入0 次删除
  1. 65 0
      .gitlab-ci.yml

+ 65 - 0
.gitlab-ci.yml

@@ -0,0 +1,65 @@
+.only_settings: &only_settings
+    - merge_requests
+    - branches@cmake/cmake
+    - tags@cmake/cmake
+
+.fedora31: &fedora31
+    image: "kitware/cmake:ci-fedora31-x86_64-2020-04-27"
+
+    variables:
+        GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-cmake ci"
+
+.fedora31_tidy: &fedora31_tidy
+    extends: .fedora31
+
+    variables:
+        CMAKE_CONFIGURATION: fedora31_tidy
+        CTEST_NO_WARNINGS_ALLOWED: 1
+
+before_script:
+    - .gitlab/ci/cmake.sh
+    - .gitlab/ci/ninja.sh
+    - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
+    - cmake --version
+    - ninja --version
+
+.cmake_build_unix: &cmake_build_unix
+    stage: build
+    only: *only_settings
+    tags:
+        - build
+        - docker
+        - linux
+
+    script:
+        - .gitlab/ci/sccache.sh
+        - sccache --start-server
+        - sccache --show-stats
+        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
+        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
+        - sccache --show-stats
+
+    interruptible: true
+
+stages:
+    - build
+    - test
+
+build:fedora31-tidy:
+    <<:
+        - *fedora31_tidy
+    stage: build
+    only: *only_settings
+    tags:
+        - build
+        - docker
+        - linux
+
+    script:
+        - .gitlab/ci/sccache.sh
+        - sccache --start-server
+        - sccache --show-stats
+        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
+        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
+        - sccache --show-stats
+    interruptible: true