Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wallner90 committed Jul 4, 2023
0 parents commit 204a04f
Show file tree
Hide file tree
Showing 41 changed files with 3,199 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 'Lint'
description: 'Lint using devcontainer'
runs:
using: 'docker'
image: 'ros:iron-ros-base-jammy'
entrypoint: ".github/actions/lint/run.sh"
6 changes: 6 additions & 0 deletions .github/actions/lint/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

./.github/setup.sh
source /opt/ros/${ROS_DISTRO}/setup.bash
ament_${LINTER} ./
6 changes: 6 additions & 0 deletions .github/actions/test_humble/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 'Test Humble'
description: 'Test using devcontainer'
runs:
using: 'docker'
image: 'ros:humble-ros-base-jammy'
entrypoint: ".github/actions/test_humble/run.sh"
12 changes: 12 additions & 0 deletions .github/actions/test_humble/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

./.github/setup.sh
# TODO: better method of avoiding linting / testing in build, install, log, ...
mkdir -p .build_ws/src
cp -rpa * .build_ws/src/
cd .build_ws
mkdir -p build install log
chown postgres:postgres build install log -R
su -c ../.github/build.sh postgres
su -c ../.github/test.sh postgres
6 changes: 6 additions & 0 deletions .github/actions/test_iron/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 'Test Iron'
description: 'Test using devcontainer'
runs:
using: 'docker'
image: 'ros:iron-ros-base-jammy'
entrypoint: ".github/actions/test_iron/run.sh"
12 changes: 12 additions & 0 deletions .github/actions/test_iron/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

./.github/setup.sh
# TODO: better method of avoiding linting / testing in build, install, log, ...
mkdir -p .build_ws/src
cp -rpa * .build_ws/src/
cd .build_ws
mkdir -p build install log
chown postgres:postgres build install log -R
su -c ../.github/build.sh postgres
su -c ../.github/test.sh postgres
11 changes: 11 additions & 0 deletions .github/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

# Set the default build type
BUILD_TYPE=RelWithDebInfo
source /opt/ros/$ROS_DISTRO/setup.bash
colcon build \
--merge-install \
--symlink-install \
--cmake-args "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DCMAKE_EXPORT_COMPILE_COMMANDS=On" \
-Wall -Wextra -Wpedantic
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
25 changes: 25 additions & 0 deletions .github/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -e

export DEBIAN_FRONTEND=noninteractive

apt-get update

apt-get install -y curl

curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main 15" | tee /etc/apt/sources.list.d/pgdg-testing.list

apt-get update \
&& apt-get -y install --no-install-recommends \
postgresql-14 postgresql-14-postgis-3 \
python3-pip \
git-lfs \
libpq-dev \
&& apt-get autoremove -y

python3 setup.py egg_info
pip3 install -r postgis_ros_bridge.egg-info/requires.txt

rosdep update
rosdep install --from-paths . --ignore-src -y
6 changes: 6 additions & 0 deletions .github/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

if [ -f install/setup.bash ]; then source install/setup.bash; fi
colcon test --merge-install --event-handlers console_cohesion+
colcon test-result --verbose
20 changes: 20 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: docs

on:
release:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip install mkdocs-simple-plugin mkdocstrings[python]
- run: mkdocs gh-deploy --force
24 changes: 24 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Linting

on:
pull_request:
push:
workflow_dispatch:

jobs:
lint:
name: ament_${{ matrix.linter }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
linter: [xmllint, flake8, pep257]
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Run linter
uses: ./.github/actions/lint/
env:
LINTER: ${{ matrix.linter }}
19 changes: 19 additions & 0 deletions .github/workflows/ros_humble.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ROS Humble Hawksbill

on:
pull_request:
push:
workflow_dispatch:

jobs:
test_humble:
name: test_humble
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Test Humble
uses: ./.github/actions/test_humble/

19 changes: 19 additions & 0 deletions .github/workflows/ros_iron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ROS Iron Irwini

on:
pull_request:
push:
workflow_dispatch:

jobs:
test_iron:
name: test_iron
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Test Iron
uses: ./.github/actions/test_iron/

Loading

0 comments on commit 204a04f

Please sign in to comment.