mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
a5e887320b
commit
277af95b36
|
|
@ -9,35 +9,16 @@ trigger:
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-latest
|
vmImage: ubuntu-latest
|
||||||
|
|
||||||
variables:
|
|
||||||
GOBIN: '$(GOPATH)/bin' # Go binaries path
|
|
||||||
GOROOT: '/usr/local/go1.11' # Go installation path
|
|
||||||
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
|
|
||||||
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- task: GoTool@0
|
||||||
mkdir -p '$(GOBIN)'
|
inputs:
|
||||||
mkdir -p '$(GOPATH)/pkg'
|
version: '1.13.5'
|
||||||
mkdir -p '$(modulePath)'
|
- task: Go@0
|
||||||
shopt -s extglob
|
inputs:
|
||||||
shopt -s dotglob
|
command: 'get'
|
||||||
mv !(gopath) '$(modulePath)'
|
arguments: '-d'
|
||||||
echo '##vso[task.prependpath]$(GOBIN)'
|
workingDirectory: '$(System.DefaultWorkingDirectory)'
|
||||||
echo '##vso[task.prependpath]$(GOROOT)/bin'
|
|
||||||
displayName: 'Set up the Go workspace'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
go version
|
|
||||||
go get -v -t -d ./...
|
|
||||||
if [ -f Gopkg.toml ]; then
|
|
||||||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
|
||||||
dep ensure
|
|
||||||
fi
|
|
||||||
go build -v .
|
|
||||||
workingDirectory: '$(modulePath)'
|
|
||||||
displayName: 'Get dependencies, then build'
|
|
||||||
|
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
name: Build
|
name: Build
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue