File tree Expand file tree Collapse file tree 5 files changed +111
-0
lines changed Expand file tree Collapse file tree 5 files changed +111
-0
lines changed Original file line number Diff line number Diff line change 1+ trigger :
2+ tags :
3+ include :
4+ - ' *.*.*'
5+
6+ pr : none
7+
8+ resources :
9+ repositories :
10+ - repository : emacs-module-rs
11+ type : github
12+ name : ubolonton/emacs-module-rs
13+ ref : azure-pipelines
14+ endpoint : ubolonton
15+ - repository : emacs-tree-sitter
16+ type : github
17+ name : ubolonton/emacs-tree-sitter
18+ ref : azure-pipelines
19+ endpoint : ubolonton
20+
21+ jobs :
22+ - job : Build
23+ pool :
24+ vmImage : $(IMAGE_NAME)
25+ strategy :
26+ matrix :
27+ vs2017-win2016 :
28+ IMAGE_NAME : ' vs2017-win2016'
29+ BUNDLE_TARGET : windows
30+ macos-10.14-emacs-27.1 :
31+ IMAGE_NAME : ' macos-10.14'
32+ EVM_EMACS : emacs-27.1
33+ BUNDLE_TARGET : macos
34+ ubuntu-16.04-emacs-27.1 :
35+ IMAGE_NAME : ' ubuntu-16.04'
36+ EVM_EMACS : emacs-27.1
37+ BUNDLE_TARGET : linux
38+ steps :
39+ - template : .azure-pipelines/steps/setup-emacs.yml@emacs-module-rs
40+ - template : .azure-pipelines/steps/setup-cask.yml@emacs-module-rs
41+ - template : .azure-pipelines/steps/setup-tree-sitter-cli.yml@emacs-tree-sitter
42+ - template : steps/grammar-bundle/-create.yml
43+ - template : steps/grammar-bundle/-save.yml
44+
45+ - job : Publish
46+ dependsOn : Build
47+ pool :
48+ vmImage : macos-10.14
49+ variables :
50+ EVM_EMACS : emacs-26.3
51+ BUNDLE_VERSION : $[ dependencies.Build.outputs['vs2017-win2016.SetBundleVersion.BUNDLE_VERSION'] ]
52+ steps :
53+ - template : steps/grammar-bundle/-load.yml
54+ parameters :
55+ targets :
56+ - windows
57+ - macos
58+ - linux
59+ - template : steps/grammar-bundle/-upload.yml
60+ parameters :
61+ endpoint : github.com_ubolonton
Original file line number Diff line number Diff line change 1+ steps :
2+ - powershell : |
3+ $bundle_version = ((cask eval "(progn (require 'tree-sitter-langs-build) (princ tree-sitter-langs--bundle-version))") | Out-String).Trim()
4+ echo "##vso[task.setvariable variable=BUNDLE_VERSION]$bundle_version"
5+ echo "##vso[task.setvariable variable=BUNDLE_VERSION;isOutput=true]$bundle_version"
6+ cask eval "(progn (require 'tree-sitter-langs-build) (tree-sitter-langs-create-bundle :clean))"
7+ ls
8+ cask package
9+ displayName : Create grammar bundle (Windows)
10+ name : SetBundleVersion
11+ condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
12+
13+ - bash : |
14+ set -e
15+ BUNDLE_VERSION=$(cask eval "(progn (require 'tree-sitter-langs-build) (princ tree-sitter-langs--bundle-version))")
16+ echo "##vso[task.setvariable variable=BUNDLE_VERSION]$BUNDLE_VERSION"
17+ cask eval "(progn (require 'tree-sitter-langs-build) (tree-sitter-langs-create-bundle :clean))"
18+ ls
19+ cask package
20+ displayName : Create grammar bundle
21+ condition : and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
Original file line number Diff line number Diff line change 1+ parameters :
2+ targets : []
3+
4+ steps :
5+ - ${{ each target in parameters.targets }} :
6+ - task : DownloadPipelineArtifact@2
7+ displayName : Retrieve tree-sitter-grammars-${{ target }}-$(BUNDLE_VERSION).tar.gz
8+ inputs :
9+ artifact : tree-sitter-grammars-${{ target }}
10+ path : $(System.DefaultWorkingDirectory)
Original file line number Diff line number Diff line change 1+ steps :
2+ - task : PublishPipelineArtifact@1
3+ displayName : Save tree-sitter-grammars-$(BUNDLE_TARGET)-$(BUNDLE_VERSION).tar.gz
4+ inputs :
5+ targetPath : tree-sitter-grammars-$(BUNDLE_TARGET)-$(BUNDLE_VERSION).tar.gz
6+ artifactName : tree-sitter-grammars-$(BUNDLE_TARGET)
Original file line number Diff line number Diff line change 1+ parameters :
2+ - name : endpoint
3+ type : string
4+
5+ steps :
6+ - task : GitHubRelease@0
7+ inputs :
8+ gitHubConnection : ${{ parameters.endpoint }}
9+ repositoryName : ubolonton/tree-sitter-langs
10+ isDraft : true
11+ assetUploadMode : replace
12+ assets : |
13+ $(System.DefaultWorkingDirectory)/tree-sitter-grammars-*.tar.gz
You can’t perform that action at this time.
0 commit comments