diff options
Diffstat (limited to 'dendrite/build/tasks/main.yaml')
| -rw-r--r-- | dendrite/build/tasks/main.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dendrite/build/tasks/main.yaml b/dendrite/build/tasks/main.yaml index dff7bdb..10f2e12 100644 --- a/dendrite/build/tasks/main.yaml +++ b/dendrite/build/tasks/main.yaml @@ -1,5 +1,14 @@ --- +- name: ensure build work dir exists + become: yes + file: + path: "{{build_work_dir}}" + state: "directory" + owner: "{{ansible_user}}" + group: "{{ansible_user}}" + mode: "0755" + - name: install golang become: yes apt: name="golang-1.21-go" @@ -34,6 +43,11 @@ command: "go build -o bin/ ./cmd/..." args: chdir: "{{dendrite_build_dir}}" + # Keep the Go caches on build_work_dir (the SSD) instead of the SD card. + environment: + GOPATH: "{{build_work_dir}}/.go" + GOCACHE: "{{build_work_dir}}/.go-cache" + GOMODCACHE: "{{build_work_dir}}/.go-mod" when: not build_file.stat.exists - name: create build server dir |
