src.nth.io/

summaryrefslogtreecommitdiff
path: root/bin/build
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build')
-rw-r--r--bin/build/tasks/main.yaml12
1 files changed, 12 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