Skip to content

Commit

Permalink
Try environment variable trick
Browse files Browse the repository at this point in the history
  • Loading branch information
nahueespinosa committed Jan 24, 2023
1 parent 50207e8 commit a02fdef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
10 changes: 10 additions & 0 deletions .github/scripts/ccache_with_fix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

BASEDIR=$(ls -d /__w/beluga/beluga/ros_ws/src/??????????? | head -n 1)

echo "Using CCACHE_BASEDIR=$BASEDIR"

exec \
env VERBOSE=1 \
env CCACHE_BASEDIR=$BASEDIR \
ccache $@
16 changes: 2 additions & 14 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ jobs:
api_token: ${{ secrets.GITHUB_TOKEN }}
update_packager_index: false
remove_stale_cache: false
# Disable hashing of the current working directory to avoid cache misses
# when building in two different directories.
# This might be an issue if we use the same cache storage for
# debug and release builds.
# See https://ccache.dev/manual/latest.html#config_hash_dir.
ccache_options: |
debug=true
hash_dir=false
sloppiness=system_headers,time_macros,pch_defines,include_file_ctime,include_file_mtime

- name: Build and test
uses: ros-tooling/action-ros-ci@0.2.7
Expand All @@ -53,8 +44,8 @@ jobs:
"build": {
"mixin": ["coverage-gcc", "coverage-pytest"],
"cmake-args": [
"-DCMAKE_C_COMPILER_LAUNCHER=ccache;-o;hash_dir=false;-o;debug=true;&&;ccache;-p;&&;ccache",
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache;-o;hash_dir=false;-o;debug=true;&&;ccache;-p;&&;ccache"
"-DCMAKE_C_COMPILER_LAUNCHER=/__w/beluga/beluga/.github/scripts/ccache_with_fix.sh",
"-DCMAKE_CXX_COMPILER_LAUNCHER=/__w/beluga/beluga/.github/scripts/ccache_with_fix.sh"
]
},
"test": {
Expand All @@ -72,9 +63,6 @@ jobs:
- name: Lint
shell: bash
run: |
cat ros_ws/build/compile_commands.json
ls -la ros_ws/src
ccache --print-stats
git config --global --add safe.directory $PWD
source /opt/ros/${{ env.ROS_DISTRO }}/setup.sh
pre-commit run --all-files --verbose --show-diff-on-failure
Expand Down

0 comments on commit a02fdef

Please sign in to comment.