-
Notifications
You must be signed in to change notification settings - Fork 35
Cache workspaces [ros2] #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tylerjw
wants to merge
10
commits into
moveit:ros2
Choose a base branch
from
tylerjw:cache-workspaces
base: ros2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0c428c2
try caching whole workspaces
tylerjw ed1f4f6
add cache prefix
tylerjw b6172b8
test latest changes
tylerjw 598a521
how much is deleted
tylerjw ba63866
latest from moveit2
tylerjw ef0760b
clang-tidy
tylerjw c48f6fc
don't mix styles
tylerjw 8783a6f
try the format fails comment action
tylerjw cd18b8f
try different message
tylerjw 7ee9447
remove failed attempt to leave comment
tylerjw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,33 +11,70 @@ jobs: | |
| matrix: | ||
| env: | ||
| - { | ||
| ROS_DISTRO: foxy, ROS_REPO: main, CCOV_UPLOAD: true, | ||
| CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'", | ||
| AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov', | ||
| ADDITIONAL_DEBS: 'curl lcov grep' | ||
| IMAGE: 'foxy-ci', | ||
| CCOV: true, | ||
| AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov' | ||
| } | ||
| - { | ||
| IMAGE: 'foxy-ci-testing', | ||
| } | ||
| - {ROS_DISTRO: foxy, ROS_REPO: testing, CCOV_UPLOAD: false} | ||
| env: | ||
| UPSTREAM_WORKSPACE: warehouse_ros_mongo.repos | ||
| CCACHE_DIR: /home/runner/.ccache | ||
| BASEDIR: .base | ||
| DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }} | ||
| UPSTREAM_WORKSPACE: upstream.repos | ||
| CCOV: ${{ matrix.env.CCOV }} | ||
| AFTER_SETUP_UPSTREAM_WORKSPACE: 'vcs pull $BASEDIR/upstream_ws/src' | ||
| TARGET_CMAKE_ARGS: > | ||
| -DCMAKE_BUILD_TYPE=${{ matrix.env.CCOV && 'Debug' || 'Release'}} | ||
| ${{ matrix.env.CCOV && '-DCMAKE_CXX_FLAGS="--coverage" --no-warn-unused-cli' || '' }} | ||
| CCACHE_DIR: "${{ github.workspace }}/.ccache" | ||
| BASEDIR: ${{ github.workspace }}/.work | ||
|
tylerjw marked this conversation as resolved.
|
||
| CACHE_PREFIX: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}" | ||
|
|
||
| name: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && ' + ccov' || ''}}" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/cache@v2 | ||
| - name: cache upstream_ws | ||
| uses: pat-s/always-upload-cache@v2.1.3 | ||
| with: | ||
| path: ${{ env.BASEDIR }}/upstream_ws | ||
| key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2.repos') }}-${{ github.run_id }} | ||
| restore-keys: | | ||
| upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2.repos') }} | ||
| - name: cache target_ws | ||
| if: ${{ ! env.CCOV }} | ||
| uses: pat-s/always-upload-cache@v2.1.3 | ||
| with: | ||
| path: ${{ env.BASEDIR }}/target_ws | ||
| key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.xml') }}-${{ github.run_id }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can hash multiple file patterns at once: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#example-with-multiple-patterns |
||
| restore-keys: | | ||
| target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.xml') }} | ||
| - name: cache ccache | ||
| uses: pat-s/always-upload-cache@v2.1.3 | ||
| with: | ||
| path: ${{ env.CCACHE_DIR }} | ||
| key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}-${{ github.sha }} | ||
| key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} | ||
| restore-keys: | | ||
| ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} | ||
| - uses: 'ros-industrial/industrial_ci@master' | ||
| ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} | ||
| ccache-${{ env.CACHE_PREFIX }} | ||
| - name: industrial_ci | ||
| uses: 'ros-industrial/industrial_ci@master' | ||
| env: ${{ matrix.env }} | ||
| - uses: actions/upload-artifact@v2 | ||
| - name: upload test artifacts (on failure) | ||
| uses: actions/upload-artifact@v2 | ||
| if: failure() | ||
| with: | ||
| name: test-results | ||
| path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml | ||
| - uses: codecov/codecov-action@v1 | ||
| if: ${{ matrix.env.CCOV_UPLOAD }} | ||
| - name: upload codecov report | ||
| uses: codecov/codecov-action@v1 | ||
| if: ${{ env.CCOV }} | ||
| with: | ||
| files: ${{ env.BASEDIR }}/coverage.info | ||
| - name: prepare target_ws for cache | ||
| if: ${{ always() && ! env.CCOV }} | ||
| run: | ||
| du -sh ${{ env.BASEDIR }}/target_ws | ||
| sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete | ||
| sudo rm -rf ${{ env.BASEDIR }}/target_ws/src | ||
| du -sh ${{ env.BASEDIR }}/target_ws | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't mix in json syntax here (even though yaml is a superset of json). This reads much better (and is consistent) with the formatting of the remaining file: