Skip to content

Commit

Permalink
Check tidy and format
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed May 14, 2019
1 parent 7c1c290 commit fbc0028
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 19 deletions.
3 changes: 0 additions & 3 deletions .ci/azure-steps.yml → .ci/azure-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ steps:
displayName: 'Build'
workingDirectory: build

- script: ctest --output-on-failure -C $(cli11.build_type)
displayName: 'Test'
workingDirectory: build
16 changes: 16 additions & 0 deletions .ci/azure-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
steps:

# Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
- bash: |
wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
echo "29faa62fb3a0b6323caa3d9557e1a5f1205614c0d4c5c2a9917f16a74f7eff68 cmake-3.14.3-Linux-x86_64.tar.gz" | shasum -sca 256
displayName: Download CMake

- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'cmake*.tar.gz'
destinationFolder: 'cmake_program'
displayName: Extract CMake

- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
displayName: Add CMake to PATH
5 changes: 5 additions & 0 deletions .ci/azure-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
steps:

- script: ctest --output-on-failure -C $(cli11.build_type)
displayName: 'Test'
workingDirectory: build
33 changes: 17 additions & 16 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,22 @@ variables:

jobs:

- job: ClangFormat
- job: ClangFormatTidy
variables:
CXX_FLAGS: "-Werror -Wcast-align -Wfloat-equal -Wimplicit-atomic-properties -Wmissing-declarations -Woverlength-strings -Wshadow -Wstrict-selector-match -Wundeclared-selector -Wunreachable-code -std=c++11"
cli11.options: -DCLANG_TIDY_FIX=ON
cli11.std: 11
cli11.single: OFF
pool:
vmImage: 'ubuntu-16.04'
containerImage: silkeh/clang:5
steps:
- script: scripts/check_style_docker.sh
- script: scripts/check_style.sh
displayName: Check format
- template: .ci/azure-cmake.yml
- template: .ci/azure-build.sh
- script: git diff --exit-code --color
displayName: Check tidy

- job: Native
strategy:
Expand All @@ -33,7 +43,8 @@ jobs:
pool:
vmImage: $(vmImage)
steps:
- template: .ci/azure-steps.yml
- template: .ci/azure-build.yml
- template: .ci/azure-test.yml

- job: Docker
variables:
Expand All @@ -57,17 +68,7 @@ jobs:
cli11.options: -DCLI11_FORCE_LIBCXX=ON
container: $[ variables['containerImage'] ]
steps:
# Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
- script: |
wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
echo "29faa62fb3a0b6323caa3d9557e1a5f1205614c0d4c5c2a9917f16a74f7eff68 cmake-3.14.3-Linux-x86_64.tar.gz" | shasum -sca 256
displayName: Download CMake
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'cmake*.tar.gz'
destinationFolder: 'cmake_program'
displayName: Extract CMake
- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
displayName: Add CMake to PATH
- template: .ci/azure-steps.yml
- template: .ci/azure-cmake.yml
- template: .ci/azure-build.yml
- template: .ci/azure-test.yml

0 comments on commit fbc0028

Please sign in to comment.