From 89af2acd0102016e9199b143da1771e0b89689bc Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Fri, 21 Feb 2025 21:34:54 +0100 Subject: [PATCH 1/3] Rename scheduled workflow to nightly --- .github/workflows/{scheduled.yaml => nightly.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{scheduled.yaml => nightly.yaml} (99%) diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/nightly.yaml similarity index 99% rename from .github/workflows/scheduled.yaml rename to .github/workflows/nightly.yaml index 4efcf6c9..dbaa611d 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/nightly.yaml @@ -1,4 +1,4 @@ -name: scheduled +name: nightly on: workflow_dispatch: From 5e5c6b9ac32e2b50a71793204ee538af35454b48 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Fri, 21 Feb 2025 22:15:07 +0100 Subject: [PATCH 2/3] Build new packages in ros-one.repos --- .github/workflows/packages.build.yaml | 54 +++++++++++++++++++++++++++ .github/workflows/packages.yaml | 24 ++++++++++++ src/scripts/pkg_diffs.py | 48 ++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 .github/workflows/packages.build.yaml create mode 100644 .github/workflows/packages.yaml create mode 100644 src/scripts/pkg_diffs.py diff --git a/.github/workflows/packages.build.yaml b/.github/workflows/packages.build.yaml new file mode 100644 index 00000000..d0758574 --- /dev/null +++ b/.github/workflows/packages.build.yaml @@ -0,0 +1,54 @@ +name: reusable packages workflow + +on: + # make this workflow reusable (and only so) + workflow_call: + inputs: + ARCH: + type: string + description: build architecture + required: true + DEB_DISTRO: + type: string + description: build distribution + required: true + +env: + TERM: xterm # needed for colored output of unittests + +jobs: + build: + name: "${{ inputs.DEB_DISTRO }}-${{ inputs.ARCH }}" + runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-22.04' || (inputs.ARCH == 'arm64' && 'ubuntu-22.04-arm' || inputs.ARCH) }} + + steps: + - run: pip install gitpython + - uses: actions/checkout@v4 + - name: fetch ${{ github.base_ref }} + run: | + git fetch --no-tags --depth=1 origin ${{ github.base_ref }} + git checkout ${{ github.base_ref }} + git checkout HEAD@{1} + - name: determine new packages + run: python3 src/scripts/pkg_diffs.py "${{ github.base_ref }}" + - name: Build new packages + uses: ./ + env: + DEB_DISTRO: ${{ inputs.DEB_DISTRO }} + ARCH: ${{ inputs.ARCH }} + ROS_SOURCES: /tmp/diff.repos + INSTALL_GPG_KEYS: | + sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg + sudo mkdir -p /etc/ros/rosdep/sources.list.d + echo "yaml https://ros.packages.techfak.net/ros-one.yaml ${{ inputs.DEB_DISTRO }}" | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-one.list + EXTRA_DEB_SOURCES: "deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net ${{inputs.DEB_DISTRO}}-testing main" + EXTRA_SBUILD_CONFIG: ${{ vars.EXTRA_SBUILD_CONFIG }} + EXTRA_SBUILD_OPTS: ${{ vars.EXTRA_SBUILD_OPTS }} + DEB_BUILD_OPTIONS: ${{ vars.DEB_BUILD_OPTIONS || 'nocheck' }} + CONTINUE_ON_ERROR: ${{ vars.CONTINUE_ON_ERROR || true }} + SKIP_EXISTING: ${{ vars.SKIP_EXISTING || false }} + SKIP_KNOWN_FAILING: false + INSTALL_TO_CHROOT: false + VERBOSE: ${{ vars.VERBOSE || '' }} + DOWNLOAD_DEBS: false + DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO }}-${{ inputs.ARCH }}-debs diff --git a/.github/workflows/packages.yaml b/.github/workflows/packages.yaml new file mode 100644 index 00000000..bfcae37d --- /dev/null +++ b/.github/workflows/packages.yaml @@ -0,0 +1,24 @@ +name: packages + +on: + pull_request: + paths: + - '*.repos' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + fail-fast: false + matrix: + DEB_DISTRO: [ jammy, noble ] + ARCH: [ x64, arm64 ] + + uses: ./.github/workflows/packages.build.yaml + secrets: inherit + with: + DEB_DISTRO: ${{ matrix.DEB_DISTRO }} + ARCH: ${{ matrix.ARCH }} diff --git a/src/scripts/pkg_diffs.py b/src/scripts/pkg_diffs.py new file mode 100644 index 00000000..3dade03d --- /dev/null +++ b/src/scripts/pkg_diffs.py @@ -0,0 +1,48 @@ +# /usr/bin/env python3 + +import os +import git +import yaml +import argparse + + +def load_from_commit(repo_path, sha, files): + repo = git.Repo(repo_path) + commit = repo.commit(sha) + content = dict() + for file in files: + file_content = commit.tree / file + content.update(yaml.safe_load(file_content.data_stream.read())) + return content + + +def is_same(left, right): + for key, val in left.items(): + if key not in right or left[key] != right[key]: + return False + return True + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Determine changed packages") + parser.add_argument("sha", help="commit SHA to compare with") + parser.add_argument( + "files", nargs="*", default=["ros-one.repos"], help=".repos files to consider" + ) + args = parser.parse_args() + + old = load_from_commit(os.getcwd(), args.sha, args.files) + new = load_from_commit(os.getcwd(), "HEAD", args.files) + + try: + del new["known_failures"] + except KeyError: + pass + + # Remove entries from new that already exist in old + for key, val in old["repositories"].items(): + if key in new["repositories"] and is_same(new["repositories"][key], val): + del new["repositories"][key] + + with open("/tmp/diff.repos", "w") as f: + yaml.dump(new, f) From 108b40fa59117ad64cfd4ef990e9426969903893 Mon Sep 17 00:00:00 2001 From: Yuki Furuta Date: Fri, 21 Feb 2025 20:44:09 -0800 Subject: [PATCH 3/3] Add ros-perception/opencv_apps (#29) --- ros-one.repos | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ros-one.repos b/ros-one.repos index b8a557a6..92831f41 100644 --- a/ros-one.repos +++ b/ros-one.repos @@ -519,6 +519,10 @@ repositories: type: git url: https://github.com/ros-perception/open_karto.git version: melodic-devel + opencv_apps: + type: git + url: https://github.com/ros-perception/opencv_apps.git + version: indigo openni2_camera: type: git url: https://github.com/ros-o/openni2_camera.git