Skip to content

Commit

Permalink
add ccache for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
George Adams committed Dec 4, 2017
1 parent c7010d7 commit bad9b93
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ansible/roles/baselayout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@
- "{{ packages[os|stripversion]|default('[]') }}"
- "{{ common_packages|default('[]') }}"

- name: Check whether /etc/paths contains "/usr/localopt/ccache/libexec" (macos)
when: os|startswith("macos")
command: grep -Fxq "/usr/localopt/ccache/libexec" /etc/paths
register: ccache_mac
check_mode: no
ignore_errors: yes
changed_when: no

- name: add ccache to the path (macos)
when: ccache_mac.rc == 1
lineinfile: dest=/etc/paths
insertbefore=BOF
line='/usr/localopt/ccache/libexec'

- name: update package alternatives
when: os == "ubuntu1404"
alternatives: link=/usr/bin/{{ gcc }} name={{ gcc }} path=/usr/bin/{{ gcc }}-4.9
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ packages: {
macos: [
'curl',
'python2',
'ccache',
],

smartos14: [
Expand Down

0 comments on commit bad9b93

Please sign in to comment.