src.nth.io/

summaryrefslogtreecommitdiff
path: root/nostr/build
diff options
context:
space:
mode:
Diffstat (limited to 'nostr/build')
-rw-r--r--nostr/build/tasks/main.yaml14
1 files changed, 14 insertions, 0 deletions
diff --git a/nostr/build/tasks/main.yaml b/nostr/build/tasks/main.yaml
index 1b0d9a4..8d7b891 100644
--- a/nostr/build/tasks/main.yaml
+++ b/nostr/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"
@@ -59,6 +68,11 @@
command: "go build"
args:
chdir: "{{relayer_build_dir}}/examples/whitelisted"
+ # 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