Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Dec 13, 2024
1 parent 9b91dd5 commit b52b1ae
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 63 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ name: Build Docker
on:
workflow_call:
inputs:
codebase_version:
description: Version of the panther_ros to be used in the docker image (branch/tag/commit).
required: true
type: string
default: ros2-devel
build_type:
description: Is it a "development" or a "stable" release?
required: true
Expand All @@ -31,11 +26,6 @@ on:
default: '20131206'
workflow_dispatch:
inputs:
codebase_version:
description: Version of the panther_ros to be used in the docker image (branch/tag/commit).
required: true
type: string
default: ros2-devel
build_type:
description: Is it a "development" or a "stable" release?
required: true
Expand Down Expand Up @@ -86,7 +76,6 @@ jobs:
main_branch_name: ros2
dockerfile: ${{ matrix.dockerfile }}
repo_name: ${{ matrix.repo_name }}
branch_name: ${{ inputs.panther_codebase_version }}
build_type: ${{ inputs.build_type }}
ros_distro: ${{ matrix.ros_distro }}
platforms: ${{ matrix.platforms }}
Expand Down
52 changes: 22 additions & 30 deletions .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ env:
RC_BRANCH_NAME: ${{ github.event.inputs.version }}-${{ github.event.inputs.date }}

jobs:
check_docs:
name: Check docs build
docs:
name: Docs
runs-on: ubuntu-22.04
steps:
- name: Trigger repository build workflow
- name: Check docs build
uses: convictional/[email protected]
with:
owner: husarion
Expand All @@ -29,24 +29,24 @@ jobs:
ref: master
client_payload: '{"husarion_ugv_branch": "ros2-devel"}'

# TODO: Add unit testing for panther_ros when ready
unit_test_panther_ros:
name: Run unit tests for panther_ros
# TODO: Add unit testing when ready
unit_tests:
name: Unit tests
runs-on: ubuntu-22.04
steps:
- name: Trigger repository build workflow
- name: Run unit tests
run: echo "Unit tests for panther_ros are not fully implemented yet -> SKIPPING!"

create_release_candidate_branches:
name: Create release candidate branches
create_branches:
name: Create branches
runs-on: ubuntu-22.04
needs:
- unit_test_panther_ros
- unit_tests
strategy:
matrix:
repo: [panther_ros, panther-rpi-os-img]
steps:
- name: Create test branch
- name: Create release candidate branch
uses: GuillaumeFalourd/[email protected]
with:
repository_owner: husarion
Expand All @@ -56,10 +56,10 @@ jobs:
access_token: ${{ secrets.GH_PAT}}

update_tags_in_compose:
name: Update Docker image tags in compose
name: Update tags in compose
runs-on: ubuntu-22.04
needs:
- create_release_candidate_branches
- create_branches
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -73,32 +73,31 @@ jobs:
sed -i 's/\(husarion\/panther:humble-\)[^[:space:]]*/\1${{ env.RC_BRANCH_NAME }}/g' docker/demo/compose.hardware.yaml
sed -i 's/\(husarion\/panther-gazebo:humble-\)[^[:space:]]*/\1${{ env.RC_BRANCH_NAME }}/g' docker/demo/compose.simulation.yaml
- name: Commit changes to target branch
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: Update docker image tag
message: Update tags in compose files
author_name: action-bot
author_email: [email protected]

build_docker:
name: Build Docker
docker:
name: Docker
runs-on: ubuntu-22.04
needs:
- update_tags_in_compose
steps:
- name: Build development Docker
- name: Build Docker
uses: ./.github/workflows/build-docker.yml
with:
codebase_version: ${{ env.RC_BRANCH_NAME }}
build_type: development

build_and_publish_rpi_image:
name: Build panther system image
os_image:
name: OS image
needs:
- update_tags_in_compose
runs-on: ubuntu-22.04
steps:
- name: Trigger repository build workflow
- name: Build OS image
uses: convictional/[email protected]
with:
owner: husarion
Expand All @@ -113,14 +112,7 @@ jobs:
"image_tag": "${{ github.event.inputs.version }}"
}
build_and_publish_rpi_flash_os_image:
name: Build panther flash OS image
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
needs:
- build_and_publish_rpi_image
runs-on: ubuntu-22.04
steps:
- name: Trigger repository build workflow
- name: Build flash OS image
uses: convictional/[email protected]
with:
owner: husarion
Expand Down
29 changes: 10 additions & 19 deletions .github/workflows/release-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,21 @@ env:

jobs:
release_project:
name: Release Husarion UGV project
name: Release project
runs-on: ubuntu-22.04
steps:
- name: Release panther_ros repository
uses: convictional/[email protected]
uses: ./.github/workflows/release-repository.yaml
with:
owner: husarion
repo: panther_ros
github_token: ${{ secrets.GITHUB_TOKEN }} # Use the default GITHUB_TOKEN for local repository
workflow_file_name: release-repository.yaml
ref: ${{ env.RC_BRANCH_NAME }}
client_payload: |
{
"release_candidate": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
"prerelease": "${{ github.event.inputs.prerelease }}"
}
release_candidate: ${{ env.RC_BRANCH_NAME }}
version: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.release_name }}
automatic_mode: ${{ github.event.inputs.automatic_mode }}
prerelease: ${{ github.event.inputs.prerelease }}

- name: Build development Docker
uses: ./.github/workflows/build-docker.yml
with:
codebase_version: ${{ github.event.inputs.version }}
build_type: development

- name: Release panther-rpi-os-img repository
Expand All @@ -74,7 +65,7 @@ jobs:
"prerelease": "${{ github.event.inputs.prerelease }}"
}
- name: Build panther system image
- name: Build OS image
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
uses: convictional/[email protected]
with:
Expand All @@ -90,7 +81,7 @@ jobs:
"image_tag": "${{ github.event.inputs.version }}"
}
- name: Build panther flash OS image
- name: Build flash OS image
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
uses: convictional/[email protected]
with:
Expand All @@ -104,7 +95,7 @@ jobs:
"image_tag": "${{ github.event.inputs.version }}"
}
- name: Trigger repository build workflow
- name: Rebuild documentation
uses: convictional/[email protected]
with:
owner: husarion
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release-repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
name: Release Repository

on:
workflow_dispatch:
workflow_call:
inputs:
release_candidate:
description: Branch name of the release candidate. WARNING This branch will be deleted!
required: true
type: string
version:
description: New version (used for tag and package versioning).
required: true
type: string
release_name:
description: Name of the release to be created. Version in the first place is recommended (e.g.
`2.0.0-alpha`).
required: true
type: string
automatic_mode:
type: boolean
default: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Run unit tests
name: Unit tests

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>husarion_ugv_bringup</depend>
<depend condition="$HUSARION_ROS_BUILD_TYPE == hardware">husarion_ugv_bringup</depend>
<depend condition="$HUSARION_ROS_BUILD_TYPE == simulation">husarion_ugv_gazebo</depend>

<export>
Expand Down

0 comments on commit b52b1ae

Please sign in to comment.