mirror of
https://github.com/rclone/rclone.git
synced 2025-12-20 18:23:31 +00:00
add build caching
This commit is contained in:
@@ -79,14 +79,6 @@ variables:
|
|||||||
CPATH: ''
|
CPATH: ''
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: CacheBeta@0
|
|
||||||
inputs:
|
|
||||||
key: |
|
|
||||||
go-build-cache
|
|
||||||
$(Agent.JobName)
|
|
||||||
path: $(HOME)/.cache/go-build
|
|
||||||
displayName: Cache go build
|
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
latestGo=$(curl "https://golang.org/VERSION?m=text")
|
latestGo=$(curl "https://golang.org/VERSION?m=text")
|
||||||
echo "##vso[task.setvariable variable=GO_VERSION]$latestGo"
|
echo "##vso[task.setvariable variable=GO_VERSION]$latestGo"
|
||||||
@@ -103,8 +95,17 @@ steps:
|
|||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
shopt -s dotglob
|
shopt -s dotglob
|
||||||
mv !(gopath) '$(modulePath)'
|
mv !(gopath) '$(modulePath)'
|
||||||
|
mkdir -p $(HOME)/.cache/go-build
|
||||||
displayName: Remove old Go, set GOBIN/GOROOT, and move project into GOPATH
|
displayName: Remove old Go, set GOBIN/GOROOT, and move project into GOPATH
|
||||||
|
|
||||||
|
- task: CacheBeta@0
|
||||||
|
inputs:
|
||||||
|
key: |
|
||||||
|
go-build-cache
|
||||||
|
$(Agent.JobName)
|
||||||
|
path: $(HOME)/.cache/go-build
|
||||||
|
displayName: Cache go build
|
||||||
|
|
||||||
# Install Libraries (varies by platform)
|
# Install Libraries (varies by platform)
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
|
|||||||
Reference in New Issue
Block a user