src.nth.io/

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/build/tasks/main.yaml12
-rw-r--r--dendrite/build/tasks/main.yaml14
-rw-r--r--mattertimesync/build/tasks/main.yaml14
-rw-r--r--nostr/build/tasks/main.yaml14
-rw-r--r--pleroma/build/tasks/main.yaml20
5 files changed, 74 insertions, 0 deletions
diff --git a/bin/build/tasks/main.yaml b/bin/build/tasks/main.yaml
index 2a29635..8da49b6 100644
--- a/bin/build/tasks/main.yaml
+++ b/bin/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 cargo
become: yes
apt: name="cargo"
@@ -20,6 +29,9 @@
command: "cargo build --release"
args:
chdir: "{{bin_build_dir}}"
+ # Keep the cargo cache on build_work_dir (the SSD) instead of the SD card.
+ environment:
+ CARGO_HOME: "{{build_work_dir}}/.cargo"
when: not build_file.stat.exists
- name: create build server dir
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
diff --git a/mattertimesync/build/tasks/main.yaml b/mattertimesync/build/tasks/main.yaml
index e846f9c..c586e01 100644
--- a/mattertimesync/build/tasks/main.yaml
+++ b/mattertimesync/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: unarchive mattertimesync source
unarchive:
remote_src: yes
@@ -16,6 +25,9 @@
command: "npm ci"
args:
chdir: "{{mattertimesync_build_dir}}"
+ # Keep the npm cache on build_work_dir (the SSD) instead of the SD card.
+ environment:
+ npm_config_cache: "{{build_work_dir}}/.npm"
when: not build_file.stat.exists
- name: bundle mattertimesync
@@ -23,6 +35,8 @@
args:
chdir: "{{mattertimesync_build_dir}}"
creates: "{{mattertimesync_build_dir}}/mattertimesync.mjs"
+ environment:
+ npm_config_cache: "{{build_work_dir}}/.npm"
when: not build_file.stat.exists
- name: create build server dir
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
diff --git a/pleroma/build/tasks/main.yaml b/pleroma/build/tasks/main.yaml
index 704c0a4..200b215 100644
--- a/pleroma/build/tasks/main.yaml
+++ b/pleroma/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 elixir build dependencies
become: yes
apt:
@@ -31,10 +40,17 @@
- name: install hex package manager
command: mix local.hex --force
+ # Keep the mix/hex caches on build_work_dir (the SSD) instead of the SD card.
+ environment:
+ MIX_HOME: "{{build_work_dir}}/.mix"
+ HEX_HOME: "{{build_work_dir}}/.hex"
changed_when: false
- name: install rebar
command: mix local.rebar --force
+ environment:
+ MIX_HOME: "{{build_work_dir}}/.mix"
+ HEX_HOME: "{{build_work_dir}}/.hex"
changed_when: false
- name: unarchive pleroma source
@@ -55,6 +71,8 @@
chdir: "{{pleroma_build_dir}}"
environment:
MIX_ENV: prod
+ MIX_HOME: "{{build_work_dir}}/.mix"
+ HEX_HOME: "{{build_work_dir}}/.hex"
when: not build_file.stat.exists
- name: build pleroma release
@@ -63,6 +81,8 @@
chdir: "{{pleroma_build_dir}}"
environment:
MIX_ENV: prod
+ MIX_HOME: "{{build_work_dir}}/.mix"
+ HEX_HOME: "{{build_work_dir}}/.hex"
when: not build_file.stat.exists
- name: create build server dir