Skip to content

Commit

Permalink
Link CC and CXX to ccache
Browse files Browse the repository at this point in the history
Signed-off-by: oguzkaganozt <[email protected]>
  • Loading branch information
oguzkaganozt committed Mar 20, 2024
1 parent e2af13f commit a3dd5d0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ jobs:
- name: Show disk space
run: |
df -h
- name: Show ccache stats
run: |
ccache -s
4 changes: 4 additions & 0 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ jobs:
- name: Show disk space
run: |
df -h
- name: Show ccache stats
run: |
ccache -s
25 changes: 25 additions & 0 deletions ansible/roles/build_tools/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,28 @@
name: ccache
state: latest
update_cache: true

- name: Add CCACHE_DIR to .bashrc
ansible.builtin.lineinfile:
dest: ~/.bashrc
line: export CCACHE_DIR="/ccache"
state: present
create: true
mode: 0644

- name: Export CC to ccache
ansible.builtin.lineinfile:
dest: ~/.bashrc
line: export CC="/usr/lib/ccache/gcc"
state: present
create: true
mode: 0644

- name: Export CXX to ccache
ansible.builtin.lineinfile:
dest: ~/.bashrc
line: export CXX="/usr/lib/ccache/g++"
state: present
create: true
mode: 0644

3 changes: 0 additions & 3 deletions docker/autoware-openadk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG SETUP_ARGS
ARG ROS_DISTRO
ENV CCACHE_DIR=/ccache
ENV CC="/usr/lib/ccache/gcc"
ENV CXX="/usr/lib/ccache/g++"

# Set up development environment
RUN --mount=type=ssh \
Expand Down

0 comments on commit a3dd5d0

Please sign in to comment.