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:
|
jobs:
|
||||||
- job: ${{ parameters.name }}
|
- job: ${{ parameters.name }}
|
||||||
dependsOn: Initialization
|
dependsOn: CodeFormatValidation
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
|
@ -10,8 +10,21 @@ jobs:
|
|||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
- template: azure-pipelines-build-number.yml
|
- template: azure-pipelines-build-number.yml
|
||||||
- job: Linux
|
- job: CodeFormatValidation
|
||||||
dependsOn: Initialization
|
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:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-16.04'
|
||||||
steps:
|
steps:
|
||||||
@ -45,7 +58,7 @@ jobs:
|
|||||||
path: $(Build.ArtifactStagingDirectory)
|
path: $(Build.ArtifactStagingDirectory)
|
||||||
artifactName: src $(Build.BuildNumber) tarball
|
artifactName: src $(Build.BuildNumber) tarball
|
||||||
- job: MacOS
|
- job: MacOS
|
||||||
dependsOn: Initialization
|
dependsOn: CodeFormatValidation
|
||||||
variables:
|
variables:
|
||||||
- group: macos-codesign
|
- group: macos-codesign
|
||||||
pool:
|
pool:
|
||||||
@ -55,7 +68,6 @@ jobs:
|
|||||||
brew install qt
|
brew install qt
|
||||||
brew link qt --force
|
brew link qt --force
|
||||||
brew install create-dmg
|
brew install create-dmg
|
||||||
brew install clang-format
|
|
||||||
brew install node
|
brew install node
|
||||||
brew link --overwrite node
|
brew link --overwrite node
|
||||||
npm install -g appdmg
|
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
|
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
|
mv $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02 $(Build.SourcesDirectory)/compressed_archive/libp7zip
|
||||||
displayName: 'Install dependencies'
|
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
|
- task: InstallAppleCertificate@2
|
||||||
inputs:
|
inputs:
|
||||||
certSecureFile: 'developerID_application.p12'
|
certSecureFile: 'developerID_application.p12'
|
||||||
|
Loading…
Reference in New Issue
Block a user