Skip to content
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

Fix Linux CI #3

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/ci/colcon_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"--no-warn-unused-cli",
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON",
# BFD in conda is not compiled with fPIC
"-DSTACK_DETAILS_AUTO_DETECT:BOOL=FALSE",
"-DSTACK_DETAILS_BFD:BOOL=FALSE",

],
"event-handlers": [
"console_cohesion+",
Expand Down
66 changes: 66 additions & 0 deletions collection-ionic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
repositories:
gz-cmake:
type: git
url: https://github.com/gazebosim/gz-cmake
version: main
gz-common:
type: git
url: https://github.com/gazebosim/gz-common
version: main
gz-fuel-tools:
type: git
url: https://github.com/gazebosim/gz-fuel-tools
version: main
gz-sim:
type: git
url: https://github.com/gazebosim/gz-sim
version: main
gz-gui:
type: git
url: https://github.com/gazebosim/gz-gui
version: main
gz-launch:
type: git
url: https://github.com/gazebosim/gz-launch
version: main
gz-math:
type: git
url: https://github.com/gazebosim/gz-math
version: main
gz-msgs:
type: git
url: https://github.com/gazebosim/gz-msgs
version: main
gz-physics:
type: git
url: https://github.com/gazebosim/gz-physics
version: main
gz-plugin:
type: git
url: https://github.com/gazebosim/gz-plugin
version: main
gz-rendering:
type: git
url: https://github.com/gazebosim/gz-rendering
version: mjcarroll/pixi_gl
gz-sensors:
type: git
url: https://github.com/gazebosim/gz-sensors
version: main
gz-tools:
type: git
url: https://github.com/gazebosim/gz-tools
version: gz-tools2
gz-transport:
type: git
url: https://github.com/gazebosim/gz-transport
version: main
gz-utils:
type: git
url: https://github.com/gazebosim/gz-utils
version: main
sdformat:
type: git
url: https://github.com/gazebosim/sdformat
version: main
3 changes: 2 additions & 1 deletion gazebo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[ros]
[gazebo]
distro = "ionic"
colcon_defaults = ".github/ci/colcon_defaults.yaml"
repos_file = "collection-ionic.yaml"
22 changes: 16 additions & 6 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@

def sync(args, rem_args):
from vcstool.commands.vcs import main as vcs_main
if not os.path.exists(f'{args.distro}_ws/src'):
os.makedirs(os.path.join(args.curdir, f'{args.distro}_ws/src'))
urllib.request.urlretrieve(
workspace_name = f'{args.distro}_ws'
if args.repos_file:
repos_file = args.repos_file
else:
repos_file = f'{workspace_name}/gazebodistro.repos'
urllib.request.urlretrieve(
f'https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-{args.distro}.yaml',
f'{args.distro}_ws/gazebodistro.repos')
repos_file)

argv = ['import', '--input', f'{args.distro}_ws/gazebodistro.repos', *rem_args, f'{args.distro}_ws/src']
if not os.path.exists(f'{workspace_name}/src'):
os.makedirs(os.path.join(args.curdir, f'{workspace_name}/src'))

argv = ['import', '--input', repos_file, *rem_args, f'{workspace_name}/src']
return vcs_main(argv)


Expand All @@ -59,14 +65,18 @@ def clean(args, rem_args):
# Read some configuration defaults from the toml file
with open('gazebo.toml', 'rb') as f:
data = tomllib.load(f)
defaults = data['ros']
defaults = data['gazebo']

if 'repos_file' not in defaults:
defaults['repos_file'] = None

parser = argparse.ArgumentParser(
prog='Pixi Task Helper',
description='Help with common pixi tasks')

parser.add_argument('--distro', type=str, default=defaults['distro'])
parser.add_argument('--colcon-defaults', type=str, default=defaults['colcon_defaults'])
parser.add_argument('--repos-file', type=str, default=defaults['repos_file'])

subparsers = parser.add_subparsers()
sync_parser = subparsers.add_parser('sync')
Expand Down
Loading