-
Notifications
You must be signed in to change notification settings - Fork 18
Workspace repo #717
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
Flova
wants to merge
17
commits into
main
Choose a base branch
from
feature/workspace_repo
base: main
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
Workspace repo #717
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5c6c1ed
Move code to src folder
Flova 2fa198e
Ignore move in git blame
Flova c37c68e
Adapt gitignore
Flova 8e50b01
Fix paths and migrate to just
Flova 179da40
Fix basler target in readme
Flova a11bdec
Fix webots install
Flova 93fe860
Install webots in CI, but do not perform ping like the basler one
Flova 0c84102
Switch shebang
Flova ab363bb
Fix bash function call in webots install
Flova fcb4000
Merge branch 'main' into feature/workspace_repo
Flova 5e78ce8
Fix hlvs entrypoint
Flova 00dd426
Rename pre-commit install githook
Flova 31e6176
Add workspace cpp paths
Flova cd98013
Adapt docs
Flova f26b975
Begin porting of setup script
Flova fd90b0a
Add recommended extentions
Flova c44b64c
FIx file location
Flova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
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
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 |
|---|---|---|
|
|
@@ -18,13 +18,13 @@ jobs: | |
| uses: fkirc/skip-duplicate-actions@v5 | ||
| with: | ||
| cancel_others: 'true' | ||
| # Remove comments to spawn an interactive debigging ssh shell in the ci | ||
|
|
||
| # Remove comments to spawn an interactive debigging ssh shell in the ci | ||
| #- name: Setup tmate session | ||
| # uses: mxschmitt/action-tmate@v3 | ||
| # with: | ||
| # with: | ||
| # detached: true | ||
|
|
||
| - name: Set up ROS ecosystem | ||
| uses: ros-tooling/[email protected] | ||
|
|
||
|
|
@@ -39,21 +39,20 @@ jobs: | |
| mkdir -p $HOME/.local/bin | ||
| echo "PATH=$PATH:/github/home/.local/bin" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Pull source code for libraries and install dependencies | ||
| - name: Install just | ||
| run: | | ||
| sudo apt-get remove -y python3-pytest-repeat #TODO remove once the upstream apt package reports the correct version on the newest pip version | ||
| make install HTTPS=true ARGS="--ci" | ||
| sudo apt-get update | ||
| sudo apt-get install -y just | ||
|
|
||
| - name: Set up colcon workspace | ||
| - name: Pull source code for libraries and install dependencies | ||
| run: | | ||
| mkdir -p /colcon_ws/src | ||
| ln -s $(realpath .) /colcon_ws/src/bitbots_main | ||
| sudo apt-get remove -y python3-pytest-repeat #TODO remove once the upstream apt package reports the correct version on the newest pip version | ||
| just HTTPS=true CI=true install | ||
|
|
||
| - name: Build packages | ||
| run: | | ||
| . /opt/ros/jazzy/setup.sh | ||
| colcon build --symlink-install | ||
| working-directory: /colcon_ws | ||
| just build | ||
|
|
||
| - name: Test packages | ||
| run: | | ||
|
|
@@ -62,4 +61,3 @@ jobs: | |
| . install/setup.sh | ||
| # Run tests for all packages | ||
| colcon test --event-handlers console_direct+ --return-code-on-test-failure --parallel-workers 1 | ||
| working-directory: /colcon_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
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
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 |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # Justfile | ||
|
|
||
| # Set shell | ||
| set shell := ["bash", "-uc"] | ||
|
|
||
| # Variables | ||
| HTTPS := "" | ||
| REPO := `pwd` | ||
| CI := "" | ||
|
|
||
| # Setup / Update related targets | ||
|
|
||
| # Install the proprietary Basler Camera SDK | ||
| install-basler: | ||
| scripts/make_basler.sh {{ if CI != "" {"--ci"} else {""} }} | ||
|
|
||
| # Install Webots Simulation environment | ||
| install-webots: | ||
| scripts/make_webots.sh {{ if CI != "" {"--ci"} else {""} }} | ||
|
|
||
| # Install all dependencies, pull all repositories, ... | ||
| install: pull-init install-basler install-webots update | ||
|
|
||
| # Same as install but without sudo commands (apt/ros dependencies must be already installed on the system) | ||
| install-no-root: pull-init update-no-root | ||
|
|
||
| # Install python dependencies | ||
| pip: | ||
| # Install and upgrade pip dependencies | ||
| pip install --upgrade pip --user --break-system-packages -v | ||
| pip install --upgrade -r requirements/dev.txt --user --break-system-packages -v | ||
|
|
||
|
|
||
| # Sets up pre-commit hooks that check code formatting etc. before each commit | ||
| install-pre-commit: | ||
| pre-commit install | ||
|
|
||
| # This is needed as the ROS vscode extension adds absolute paths to some files and we do not want to commit those. | ||
| # Install git filters to remove absolute paths from files before committing them. | ||
| install-git-filters: | ||
| # Install git filters | ||
| git config filter.removeFullHomePath.clean "sed '/\/\(home\|root\).*\(install\|build\)/d'" | ||
|
|
||
| # Formats the code according to our style guidelines | ||
| format: | ||
| pre-commit run --all-files | ||
|
|
||
| # Clones/Overrides all library repositories and pulls all auxiliary files (like neural network weights) | ||
| pull-init: fresh-libs pull-files | ||
|
|
||
| # Pull all auxiliary files (like neural network weights) from the http server | ||
| pull-files: | ||
| wget --no-verbose --show-progress --timeout=15 --tries=2 --recursive --timestamping --no-parent --no-host-directories --directory-prefix={{REPO}}/src/bitbots_vision --reject "index.html*" "https://data.bit-bots.de/models/" | ||
| wget --no-verbose --show-progress --timeout=15 --tries=2 --recursive --timestamping --no-parent --no-host-directories --directory-prefix={{REPO}}/src/bitbots_motion/bitbots_rl_motion --reject "index.html*" "https://data.bit-bots.de/rl_walk_models/" | ||
|
|
||
| # Remove all library repositories and re-clone them | ||
| fresh-libs: remove-libs clone-libs | ||
|
|
||
| # Remove all library repositories | ||
| remove-libs: | ||
| rm -rf src/lib/* | ||
| rm -rf src/bitbots_team_communication/bitbots_team_communication/bitbots_team_communication/RobocupProtocol | ||
| rm src/bitbots_team_communication/bitbots_team_communication/robocup_extension_pb2.py || true | ||
|
|
||
| # Clone all library repositories | ||
| clone-libs: | ||
| if [ "{{HTTPS}}" = "true" ]; then \ | ||
| awk '{sub("[email protected]:", "https://github.com/"); print " " $$0}' workspace.repos | vcs import .; \ | ||
| else \ | ||
| vcs import . < workspace.repos; \ | ||
| fi | ||
|
|
||
| # Install all ROS managed dependencies | ||
| rosdep: | ||
| [ -f /etc/ros/rosdep/sources.list.d/20-default.list ] || sudo rosdep init | ||
| rosdep update | ||
| rosdep install --from-paths src --ignore-src --rosdistro jazzy -y | ||
|
|
||
| # Update everything (download all lib repositories, update dependencies, ...) | ||
| update: pull-init rosdep pip install-git-filters | ||
|
|
||
| # Same as update but without sudo commands (all apt/ros dependencies must be already installed on the system) | ||
| update-no-root: pull-init pip install-git-filters | ||
|
|
||
|
|
||
| # Build related targets | ||
|
|
||
| # Build a specific package or all packages | ||
| build *packages: | ||
| colcon build --symlink-install --continue-on-error {{ if packages != "" {"--packages-select " + packages} else {""} }} | ||
|
|
||
| # Clean all build artifacts or only those of specific packages | ||
| clean *packages: | ||
| if [ "{{packages}}" != "" ]; then \ | ||
| colcon clean packages --packages-select {{packages}}; \ | ||
| else \ | ||
| rm -rf install build log; \ | ||
| fi | ||
|
|
||
| # Run tests of all packages or a specific package | ||
| test *packages: | ||
| colcon test --event-handlers console_direct+ --return-code-on-test-failure {{ if packages != "" {"--packages-select " + packages} else {""} }} | ||
|
|
||
| # Development related targets | ||
|
|
||
| # Deploy the code to a robot | ||
| deploy *args: | ||
| scripts/deploy_robots.py {{args}} |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.