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

Initial package organization for garden builds #44

Merged
merged 7 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 0 additions & 6 deletions .github/actions/bazel-ci-bionic/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions .github/actions/bazel-ci-bionic/action.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/actions/bazel-ci-bionic/run.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .github/actions/bazel-ci-focal/entrypoint.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ignition-tooling/ign-ubuntu:dome-focal
FROM ghcr.io/gazebo-tooling/gz-ubuntu:garden-jammy

COPY ["run.sh", "/run.sh"]
COPY ["entrypoint.sh", "/entrypoint.sh"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Ignition install using bazel'
name: 'Gazebo install using bazel'
description: ''
author: "Michael Carroll"
inputs:
Expand All @@ -7,7 +7,7 @@ inputs:
required: true
bazel-args:
description: 'Additional Bazel arguments to use when building package under test'
required: true
required: true
default: '//...'
runs:
using: 'docker'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,32 @@ echo ::group::Install tools: pip
pip3 install -U pip vcstool colcon-common-extensions
echo ::endgroup::

echo ::group::Install tools: bazel
curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
# Install bazelisk
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64
mv ./bazelisk-linux-amd64 /usr/bin/bazel
chmod +x /usr/bin/bazel

apt update 2>&1
apt -y install bazel
echo ::endgroup::

mkdir -p /ignition/bazel
cd /ignition/bazel
vcs import . < /github/workspace/.github/ci/bazel.repos

cp -R /github/workspace ./ign_bazel
# Import repos
mkdir -p /gz
cd /gz
cp -R /github/workspace /gz/bazel
vcs import . < /github/workspace/example/bazel.repos

echo ::group::Install dependencies from binaries
EXCLUDE_APT="libignition|libsdformat|libogre|dart"
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' ' ')
apt-get install --no-install-recommends --quiet --yes $ALL_PACKAGES
echo ::endgroup::

ln -sf ./ign_bazel/example/WORKSPACE.example ./WORKSPACE
ln -sf ./ign_bazel/example/BUILD.example ./BUILD.bazel
ln -sf ./ign_bazel/example/bazelrc.example ./.bazelrc
ln -sf /gz/bazel/example/WORKSPACE.example /gz/WORKSPACE
ln -sf /gz/bazel/example/BUILD.bazel.example /gz/BUILD.bazel
ln -sf /gz/bazel/example/bazelrc.example /gz/.bazelrc
ln -sf /gz/bazel/example/bazelproject.example /gz/.bazelproject

echo ::group::Bazel sync
bazel sync || {
status=$?
echo "Error during sync"
}
echo ::group::Bazel query
bazel query $BAZEL_ARGS
echo ::endgroup::

echo ::group::Bazel build
Expand All @@ -67,4 +62,3 @@ echo ::endgroup::
echo ::group::Bazel test
bazel test $BAZEL_ARGS
echo ::endgroup::

10 changes: 0 additions & 10 deletions .github/ci/bazel.repos

This file was deleted.

2 changes: 0 additions & 2 deletions .github/ci/packages-focal.apt

This file was deleted.

1 change: 1 addition & 0 deletions .github/ci/packages-jammy.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libnlopt-cxx-dev
22 changes: 3 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Ubuntu CI
on: [push, pull_request]

jobs:
focal-ci:
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -14,22 +14,6 @@ jobs:
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

- name: Compile and test
uses: ./.github/actions/bazel-ci-focal
uses: ./.github/actions/bazel-ci-jammy
with:
bazel-args: //...

bionic-ci:
runs-on: ubuntu-latest
name: Ubuntu BionicCI
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to GHCR
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin

- name: Compile and test
uses: ./.github/actions/bazel-ci-bionic
with:
bazel-args: //...

42 changes: 4 additions & 38 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
load(
":build_defs.bzl",
"IGNITION_FEATURES",
"IGNITION_ROOT",
"IGNITION_VISIBILITY",
)
# -*- python -*-
load("@gz//bazel/lint:lint.bzl", "add_lint_tests")

package(
default_visibility = IGNITION_VISIBILITY,
features = IGNITION_FEATURES,
)
package(default_visibility = ["//visibility:public"])

licenses(["notice"])

exports_files(["LICENSE"])

py_binary(
name = "cmake_configure_file",
srcs = ["cmake_configure_file.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
)

cc_library(
name = "utilities",
hdrs = [
"ignition/utilities/ExtraTestMacros.hh",
"ignition/utilities/SuppressWarning.hh",
"ignition/utilities/detail/ExtraTestMacros.hh",
"ignition/utilities/detail/SuppressWarning.hh",
],
includes = ["."],
)

py_binary(
name = "embed_sdf",
srcs = ["embed_sdf.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
)
add_lint_tests()
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
Loading