79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
trigger:
|
|
- main
|
|
|
|
jobs:
|
|
- job: Linux
|
|
pool:
|
|
vmImage: 'ubuntu-20.04'
|
|
strategy:
|
|
maxParallel: 10
|
|
matrix:
|
|
swift57:
|
|
containerImage: swift:5.7
|
|
swift58:
|
|
containerImage: swift:5.8
|
|
container: $[ variables['containerImage'] ]
|
|
steps:
|
|
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
|
|
displayName: swift test
|
|
|
|
# TODO: Re-enable when FB11648454 is fixed
|
|
# - job: Xcode
|
|
# pool:
|
|
# vmImage: 'macOS-12'
|
|
# strategy:
|
|
# maxParallel: 10
|
|
# matrix:
|
|
# xcode14:
|
|
# DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
|
# steps:
|
|
# - script: |
|
|
# sw_vers
|
|
# xcodebuild -version
|
|
# displayName: Version Informations
|
|
# - script: xcodebuild -scheme swiftlint test -destination "platform=macOS" OTHER_SWIFT_FLAGS="\$(inherited) -D DISABLE_FOCUSED_EXAMPLES"
|
|
# displayName: xcodebuild test
|
|
- job: CocoaPods
|
|
pool:
|
|
vmImage: 'macOS-12'
|
|
variables:
|
|
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
|
|
steps:
|
|
- script: bundle install --path vendor/bundle
|
|
displayName: bundle install
|
|
- script: bundle exec pod repo update
|
|
displayName: pod repo update
|
|
- script: bundle exec pod lib lint --verbose
|
|
displayName: pod lib lint
|
|
|
|
- job: jazzy
|
|
pool:
|
|
vmImage: 'macOS-12'
|
|
variables:
|
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
|
steps:
|
|
- script: swift run swiftlint generate-docs
|
|
displayName: Run swiftlint generate-docs
|
|
- script: bundle install --path vendor/bundle
|
|
displayName: bundle install
|
|
- script: bundle exec jazzy
|
|
displayName: Run jazzy
|
|
- script: >
|
|
if ruby -rjson -e "j = JSON.parse(File.read('docs/undocumented.json')); exit j['warnings'].length != 0"; then
|
|
echo "Undocumented declarations:"
|
|
cat docs/undocumented.json
|
|
exit 1
|
|
fi
|
|
displayName: Validate documentation coverage
|
|
- task: PublishPipelineArtifact@0
|
|
inputs:
|
|
artifactName: 'API Docs'
|
|
targetPath: 'docs'
|
|
- task: DownloadSecureFile@1
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
|
|
inputs:
|
|
secureFile: doc_deploy_key
|
|
- script: ./tools/push-docs
|
|
displayName: Publish
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
|