mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Extract code format validation to its own job
It makes no sense to start building things if code validation is going to fail.
This commit is contained in:
parent
7fbfb961eb
commit
f04bb93a42
@ -10,7 +10,7 @@ parameters:
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.name }}
|
||||
dependsOn: Initialization
|
||||
dependsOn: CodeFormatValidation
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
|
@ -10,8 +10,21 @@ jobs:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
- template: azure-pipelines-build-number.yml
|
||||
- job: Linux
|
||||
- job: CodeFormatValidation
|
||||
dependsOn: Initialization
|
||||
pool:
|
||||
vmImage: 'macOS-10.14'
|
||||
steps:
|
||||
- script: |
|
||||
brew install clang-format
|
||||
displayName: 'Install dependencies'
|
||||
- script: |
|
||||
cd $(Build.SourcesDirectory)
|
||||
find . \( -name '*.h' -or -name '*.cpp' -or -name '*.c' -or -name '*.mm' -or -name '*.m' \) -print0 | xargs -0 clang-format -style=file -i
|
||||
if [ "$(git diff $(Build.SourceVersion))" != "" ]; then exit 1; fi
|
||||
displayName: 'clang-format'
|
||||
- job: Linux
|
||||
dependsOn: CodeFormatValidation
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
@ -45,7 +58,7 @@ jobs:
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
artifactName: src $(Build.BuildNumber) tarball
|
||||
- job: MacOS
|
||||
dependsOn: Initialization
|
||||
dependsOn: CodeFormatValidation
|
||||
variables:
|
||||
- group: macos-codesign
|
||||
pool:
|
||||
@ -55,7 +68,6 @@ jobs:
|
||||
brew install qt
|
||||
brew link qt --force
|
||||
brew install create-dmg
|
||||
brew install clang-format
|
||||
brew install node
|
||||
brew link --overwrite node
|
||||
npm install -g appdmg
|
||||
@ -63,11 +75,6 @@ jobs:
|
||||
tar xjf $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02_src_all.tar.bz2 -C $(Build.SourcesDirectory)/compressed_archive
|
||||
mv $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02 $(Build.SourcesDirectory)/compressed_archive/libp7zip
|
||||
displayName: 'Install dependencies'
|
||||
- script: |
|
||||
cd $(Build.SourcesDirectory)
|
||||
find . \( -name '*.h' -or -name '*.cpp' -or -name '*.c' -or -name '*.mm' -or -name '*.m' \) -print0 | xargs -0 clang-format -style=file -i
|
||||
if [ "$(git diff $(Build.SourceVersion))" != "" ]; then exit 1; fi
|
||||
displayName: 'Check format'
|
||||
- task: InstallAppleCertificate@2
|
||||
inputs:
|
||||
certSecureFile: 'developerID_application.p12'
|
||||
|
Loading…
Reference in New Issue
Block a user