[Azure Pipelines] Use `DEVELOPER_DIR` environment variable instead of executing `xcode-select`

That reduces some steps.
This commit is contained in:
Norio Nomura 2019-01-18 14:47:08 +09:00
parent cbc4fe7778
commit 07993a0ba2
No known key found for this signature in database
GPG Key ID: D4A7318EB7F7138D
1 changed files with 13 additions and 13 deletions

View File

@ -65,26 +65,26 @@ jobs:
maxParallel: 10 maxParallel: 10
matrix: matrix:
xcode901: xcode901:
XCODE_APP: 'Xcode_9.0.1' DEVELOPER_DIR: /Applications/Xcode_9.0.1.app
xcode91: xcode91:
XCODE_APP: 'Xcode_9.1' DEVELOPER_DIR: /Applications/Xcode_9.1.app
xcode92: xcode92:
XCODE_APP: 'Xcode_9.2' DEVELOPER_DIR: /Applications/Xcode_9.2.app
xcode931: xcode931:
XCODE_APP: 'Xcode_9.3.1' DEVELOPER_DIR: /Applications/Xcode_9.3.1.app
xcode941: xcode941:
XCODE_APP: 'Xcode_9.4.1' DEVELOPER_DIR: /Applications/Xcode_9.4.1.app
xcode10: xcode10:
XCODE_APP: 'Xcode_10' DEVELOPER_DIR: /Applications/Xcode_10.app
XCODE_FLAGS_FOR_TEST: -parallel-testing-enabled NO XCODE_FLAGS_FOR_TEST: -parallel-testing-enabled NO
xcode101: xcode101:
XCODE_APP: 'Xcode_10.1' DEVELOPER_DIR: /Applications/Xcode_10.1.app
XCODE_FLAGS_FOR_TEST: -parallel-testing-enabled NO XCODE_FLAGS_FOR_TEST: -parallel-testing-enabled NO
steps: steps:
- script: | - script: |
sudo xcode-select -s /Applications/$XCODE_APP.app xcodebuild -version
echo "##vso[task.setvariable variable=XCODE_FLAGS]-scheme Yams $XCODE_FLAGS_FOR_TEST" echo "##vso[task.setvariable variable=XCODE_FLAGS]-scheme Yams $XCODE_FLAGS_FOR_TEST"
displayName: xcode-select & set XCODE_FLAGS displayName: xcodebuild -version & set XCODE_FLAGS
- script: > - script: >
set -o pipefail && set -o pipefail &&
xcodebuild $XCODE_FLAGS test | xcodebuild $XCODE_FLAGS test |
@ -141,18 +141,18 @@ jobs:
- job: CocoaPods - job: CocoaPods
pool: pool:
vmImage: 'macOS 10.13' vmImage: 'macOS 10.13'
variables:
DEVELOPER_DIR: /Applications/Xcode_9.4.1.app
steps: steps:
- script: sudo xcode-select -s /Applications/Xcode_9.4.1.app
displayName: xcode-select
- script: pod lib lint - script: pod lib lint
displayName: pod lib lint displayName: pod lib lint
- job: Analyze - job: Analyze
pool: pool:
vmImage: 'macOS 10.13' vmImage: 'macOS 10.13'
variables:
DEVELOPER_DIR: /Applications/Xcode_10.1.app
steps: steps:
- script: sudo xcode-select -s /Applications/Xcode_10.1.app
displayName: xcode-select
- script: xcodebuild -scheme Yams clean build-for-testing > xcodebuild.log - script: xcodebuild -scheme Yams clean build-for-testing > xcodebuild.log
displayName: Generate xcodebuild.log displayName: Generate xcodebuild.log
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew install --HEAD https://raw.github.com/Homebrew/homebrew-core/master/Formula/swiftlint.rb - script: HOMEBREW_NO_AUTO_UPDATE=1 brew install --HEAD https://raw.github.com/Homebrew/homebrew-core/master/Formula/swiftlint.rb