Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up CI with Azure Pipelines #34

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
trigger:
- master

pr:
autoCancel: true
branches:
include:
- master

jobs:
- job: macOS
timeoutInMinutes: 360
displayName: macOS
# According to
# https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-10.14-Readme.md
# macOS-10.14 comes with Xcode 10.2.1
pool:
displayName: 'macOS 10.14'
vmImage: 'macOS-10.14'
demands: xcode
steps:
- script: 'brew install ninja cmake lrzip'
displayName: 'Installing build dependencies'

- task: DownloadGitHubRelease@0
inputs:
connection: GHRelease
userRepository: ob/swift-prebuilt
defaultVersionType: 'specificTag' # Options: latest, specificVersion, specificTag
version: 'swift-5.0.1-RELEASE-20190824.1' # Required when defaultVersionType != Latest
itemPattern: '*.lrzip' # Optional
downloadPath: 'downloads'

- script: |
lrzcat downloads/swift-source.tar.lrzip | tar -C /tmp -x -v -f -
lrzcat downloads/llvm-*.lrzip | tar -C /tmp/swift-source -x -v -f -
displayName: 'Unpack Dependencies'

- script: |
mkdir build
(cd build ; PATH=/tmp/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/bin:$PATH cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..)
(cd build ; ninja)
(cd build ; zip index-import.zip index-import)
displayName: 'Building index-import'

- script: |
(cd tests ; PATH=/tmp/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/bin:$PATH ./run.sh)
displayName: 'Testing index-import'

- task: GitHubRelease@0
inputs:
gitHubConnection: GHRelease
repositoryName: '$(Build.Repository.Name)'
action: 'create' # Options: create, edit, delete
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
tagSource: 'manual' # Required when action == Create# Options: auto, manual
tag: 'v5.0.1-$(Build.BuildNumber)'
assets: 'build/index-import.zip'
#releaseNotesSource: 'file' # Optional. Options: file, input
#releaseNotesFile: '' # Optional

1 change: 1 addition & 0 deletions tests/multiple/expected.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

CHECK: ---
CHECK: # output/v5/units/output1.c.o-{{.+}}
CHECK: WorkingDirectory: /fake/working/dir
Expand Down