[jenkins-ci PATCH] guests: Enable ccache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We install ccache on all guests where it's available, but
Fedora is the only one actually using it at the moment,
because it enables it automatically.

Tweak the user's profile so that compilation will use ccache
if it's installed.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 guests/tasks/users.yml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/guests/tasks/users.yml b/guests/tasks/users.yml
index 87693e0..1ecacee 100644
--- a/guests/tasks/users.yml
+++ b/guests/tasks/users.yml
@@ -64,3 +64,21 @@
     dest: /home/{{ flavor }}/.ccache/ccache.conf
     owner: '{{ flavor }}'
     group: '{{ flavor }}'
+
+- name: '{{ flavor }}: Enable ccache'
+  lineinfile:
+    path: /home/{{ flavor }}/.profile
+    line: 'which ccache >/dev/null 2>&1 && export CC="ccache cc"'
+    state: present
+    owner: '{{ flavor }}'
+    group: '{{ flavor }}'
+    create: yes
+
+- name: '{{ flavor }}: Enable ccache'
+  lineinfile:
+    path: /home/{{ flavor }}/.bashrc
+    line: 'which ccache >/dev/null 2>&1 && export CC="ccache cc"'
+    state: present
+    owner: '{{ flavor }}'
+    group: '{{ flavor }}'
+    create: yes
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux