Skip to content

Commit

Permalink
Minimal set of changes to get CI green (#65)
Browse files Browse the repository at this point in the history
* Minimal set of changes to get CI green.

Split from #63

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Use default fuel_tools branch

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* apt update

Signed-off-by: Michael Carroll <michael@openrobotics.org>

---------

Signed-off-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
mjcarroll authored Nov 1, 2023
1 parent 2d8db9d commit 6f41f11
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/actions/bazel-ci-jammy/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ EXCLUDE_APT="libignition|libgz|libsdformat|libogre|dart"
UBUNTU_VERSION=`lsb_release -cs`
ALL_PACKAGES=$( \
sort -u $(find . -iname 'packages-'$UBUNTU_VERSION'.apt' -o -iname 'packages.apt') | grep -Ev $EXCLUDE_APT | tr '\n' ' ')
sudo apt update
sudo apt install --no-install-recommends --quiet --yes $ALL_PACKAGES
echo ::endgroup::

Expand Down
4 changes: 3 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ load(
"@gz//bazel/skylark:build_defs.bzl",
"GZ_FEATURES",
"GZ_VISIBILITY",
"add_lint_tests",
)
load("@gz//bazel/lint:lint.bzl", "add_lint_tests")

package(
default_visibility = GZ_VISIBILITY,
Expand All @@ -13,4 +13,6 @@ package(

licenses(["notice"])

exports_files(["LICENSE"])

add_lint_tests()
4 changes: 2 additions & 2 deletions example/bazel.repos
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ repositories:
fuel_tools:
type: git
url: https://github.com/gazebosim/gz-fuel-tools
version: mjcarroll/garden_bazel
version: gz-fuel-tools8
math:
type: git
url: https://github.com/gazebosim/gz-math
version: gz-math7
msgs:
type: git
url: https://github.com/gazebosim/gz-msgs
version: gz-msgs9
version: gz-msgs9
physics:
type: git
url: https://github.com/gazebosim/gz-physics
Expand Down
15 changes: 15 additions & 0 deletions skylark/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ load(
":gz_include_header.bzl",
_gz_include_header = "gz_include_header",
)
load(
"@gz//bazel/lint:lint.bzl",
_add_lint_tests = "add_lint_tests",
)
load(
"@rules_python//python:defs.bzl",
_py_binary = "py_binary",
_py_library = "py_library",
_py_test = "py_test",
)

GZ_ROOT = "@gz//"

Expand All @@ -32,3 +42,8 @@ cmake_configure_file = _cmake_configure_file
gz_configure_header = _gz_configure_header
gz_export_header = _gz_export_header
gz_include_header = _gz_include_header
add_lint_tests = _add_lint_tests

gz_py_binary = _py_binary
gz_py_library = _py_library
gz_py_test = _py_test
3 changes: 3 additions & 0 deletions workspace/default.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ load("@gz//bazel/workspace/nlopt:repository.bzl", "nlopt_repository") # noqa
load("@gz//bazel/workspace/ode:repository.bzl", "ode_repository") # noqa
load("@gz//bazel/workspace/osg:repository.bzl", "osg_repository") # noqa
load("@gz//bazel/workspace/pycodestyle:repository.bzl", "pycodestyle_repository") # noqa
load("@gz//bazel/workspace/rules_license:repository.bzl", "rules_license_repository") # noqa
load("@gz//bazel/workspace/rules_proto:repository.bzl", "rules_proto_repository") # noqa
load("@gz//bazel/workspace/rules_python:repository.bzl", "rules_python_repository") # noqa
load("@gz//bazel/workspace/rules_qt:repository.bzl", "rules_qt_repository") # noqa
Expand Down Expand Up @@ -98,6 +99,8 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS):
osg_repository(name = "osg")
if "pycodestyle" not in excludes:
pycodestyle_repository(name = "pycodestyle", mirrors = mirrors)
if "rules_license" not in excludes:
rules_license_repository(name = "rules_license", mirrors = mirrors)
if "rules_proto" not in excludes:
rules_proto_repository(name = "rules_proto", mirrors = mirrors)
if "rules_python" not in excludes:
Expand Down
3 changes: 3 additions & 0 deletions workspace/rules_license/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
load("@gz//bazel/lint:lint.bzl", "add_lint_tests")

add_lint_tests()
14 changes: 14 additions & 0 deletions workspace/rules_license/repository.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

load("@gz//bazel/workspace:github.bzl", "github_archive")

def rules_license_repository(
name,
mirrors = None):
github_archive(
name = name,
repository = "bazelbuild/rules_license", # License: Apache-2.0
commit = "0.0.7",
sha256 = "7626bea5473d3b11d44269c5b510a210f11a78bca1ed639b0f846af955b0fe31", # noqa
mirrors = mirrors,
)

0 comments on commit 6f41f11

Please sign in to comment.