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

RSDK-2996 Release Candidate Workflows #2336

Merged
merged 27 commits into from
May 9, 2023
Merged

RSDK-2996 Release Candidate Workflows #2336

merged 27 commits into from
May 9, 2023

Conversation

Otterverse
Copy link
Member

@Otterverse Otterverse commented May 8, 2023

This updates workflows to support release candidate builds. Main changes are that each "type" of release has its own parent workflow now (main/stable/rc/pr) and sets an environment variable to match, to make it easier to do conditional logic in child workflows.

Includes is also some simplification of flow and security fixups for the license_finder flow (which was running directly on pull request!)

Manually tested against both stable and rc tags (from another branch) as well as PR's against this test branch, and pushes to this branch as "main." (SMURF tags/renames using during testing have already been reverted to simplify review.)

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot removed the safe to test This pull request is marked safe to test from a trusted zone label May 8, 2023
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 8, 2023
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label May 8, 2023
@Otterverse Otterverse marked this pull request as ready for review May 8, 2023 22:40
Copy link
Member

@edaniels edaniels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but left some comments you may want to address


steps:
- name: Check out main branch code
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

- name: Upload Files (Testing)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: google-github-actions/[email protected]
with:
headers: "cache-control: no-cache"
path: 'etc/packaging/appimages/deploy/'
destination: 'packages.viam.com/apps/viam-server/testing/appimage/${{ steps.build_test_app.outputs.date }}/${{ github.sha }}/'
destination: 'packages.viam.com/apps/viam-server/testing/appimage/${{ steps.build_date.outputs.date }}/${{ github.sha }}/'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For when we publish things, would you mind using https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/ so it's easy to click Summary on the action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even know about that GITHUB_STEP_SUMMARY file. Cool stuff! I've added output to provide links to any built binaries. Two paths basically, one when PR artifacts are built (as that bails early) and another for any push-based triggers (tags or main updates.) Examples below:

Test run (PR triggered)
https://github.com/viamrobotics/rdk/actions/runs/4930753109

Test run (push triggered)
https://github.com/viamrobotics/rdk/actions/runs/4930749546

@@ -106,10 +117,14 @@ jobs:

- name: Test AppImage
run: |
channel="${{ github.ref_name }}"
if [ "$channel" = "main" ]; then
channel="latest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short comment of why we do this here would be helpful

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added # we call our main branch releases "latest"

@@ -162,7 +162,7 @@ require (
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/color v1.14.1 // indirect
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can probably undo these two go files for this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it was required to update actionlint otherwise it failed to pass the new workflows due to this bug: rhysd/actionlint#263

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay

@@ -5,7 +5,7 @@ TOOL_BIN = bin/gotools/$(shell uname -s)-$(shell uname -m)
PATH_WITH_TOOLS="`pwd`/$(TOOL_BIN):`pwd`/node_modules/.bin:${PATH}"

GIT_REVISION = $(shell git rev-parse HEAD | tr -d '\n')
TAG_VERSION?=$(shell etc/tag_version.sh)
TAG_VERSION?=$(shell git tag --points-at | sort -Vr | head -n1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woo

@@ -25,12 +23,16 @@ jobs:
appimage:
needs: test
uses: viamrobotics/rdk/.github/workflows/appimage.yml@main
with:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to set this once in the overall workflow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with env variables, but they don't pass through. Only way I could find was to use inputs to each workflow like this (same as we have to do with secrets.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah no worries then!

.github/workflows/releasecandidate.yml Outdated Show resolved Hide resolved
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 9, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 9, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 9, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 9, 2023
This reverts commit 1f11d33.
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 9, 2023
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels May 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Code Coverage

Package Line Rate Delta Health
go.viam.com/rdk/components/arm 63% 0.00%
go.viam.com/rdk/components/arm/fake 29% 0.00%
go.viam.com/rdk/components/arm/universalrobots 41% 0.00%
go.viam.com/rdk/components/arm/wrapper 21% 0.00%
go.viam.com/rdk/components/arm/xarm 23% 0.00%
go.viam.com/rdk/components/arm/yahboom 6% 0.00%
go.viam.com/rdk/components/audioinput 44% +0.47%
go.viam.com/rdk/components/base 41% 0.00%
go.viam.com/rdk/components/base/agilex 63% 0.00%
go.viam.com/rdk/components/base/boat 40% 0.00%
go.viam.com/rdk/components/base/fake 52% 0.00%
go.viam.com/rdk/components/base/wheeled 75% 0.00%
go.viam.com/rdk/components/board 60% 0.00%
go.viam.com/rdk/components/board/fake 40% 0.00%
go.viam.com/rdk/components/board/genericlinux 19% 0.00%
go.viam.com/rdk/components/board/numato 19% 0.00%
go.viam.com/rdk/components/board/pi 50% 0.00%
go.viam.com/rdk/components/camera 57% 0.00%
go.viam.com/rdk/components/camera/align 58% 0.00%
go.viam.com/rdk/components/camera/fake 74% 0.00%
go.viam.com/rdk/components/camera/ffmpeg 82% 0.00%
go.viam.com/rdk/components/camera/rtsp 46% 0.00%
go.viam.com/rdk/components/camera/transformpipeline 77% 0.00%
go.viam.com/rdk/components/camera/videosource 33% 0.00%
go.viam.com/rdk/components/encoder 57% 0.00%
go.viam.com/rdk/components/encoder/ams 64% 0.00%
go.viam.com/rdk/components/encoder/fake 83% 0.00%
go.viam.com/rdk/components/encoder/incremental 80% 0.00%
go.viam.com/rdk/components/encoder/single 86% 0.00%
go.viam.com/rdk/components/gantry 56% 0.00%
go.viam.com/rdk/components/gantry/multiaxis 87% 0.00%
go.viam.com/rdk/components/gantry/oneaxis 87% 0.00%
go.viam.com/rdk/components/generic 79% 0.00%
go.viam.com/rdk/components/gripper 69% 0.00%
go.viam.com/rdk/components/input 88% 0.00%
go.viam.com/rdk/components/input/fake 93% 0.00%
go.viam.com/rdk/components/input/gpio 85% 0.00%
go.viam.com/rdk/components/motor 71% 0.00%
go.viam.com/rdk/components/motor/dimensionengineering 66% 0.00%
go.viam.com/rdk/components/motor/dmc4000 70% 0.00%
go.viam.com/rdk/components/motor/fake 55% 0.00%
go.viam.com/rdk/components/motor/gpio 57% -2.20%
go.viam.com/rdk/components/motor/gpiostepper 52% -0.62%
go.viam.com/rdk/components/motor/tmcstepper 64% 0.00%
go.viam.com/rdk/components/motor/ulnstepper 53% 0.00%
go.viam.com/rdk/components/movementsensor 76% 0.00%
go.viam.com/rdk/components/movementsensor/adxl345 66% 0.00%
go.viam.com/rdk/components/movementsensor/cameramono 41% 0.00%
go.viam.com/rdk/components/movementsensor/gpsnmea 51% 0.00%
go.viam.com/rdk/components/movementsensor/gpsrtk 28% 0.00%
go.viam.com/rdk/components/movementsensor/mpu6050 84% 0.00%
go.viam.com/rdk/components/posetracker 71% 0.00%
go.viam.com/rdk/components/sensor 52% 0.00%
go.viam.com/rdk/components/sensor/ultrasonic 43% 0.00%
go.viam.com/rdk/components/servo 62% 0.00%
go.viam.com/rdk/components/servo/gpio 72% 0.00%
go.viam.com/rdk/config 79% 0.00%
go.viam.com/rdk/control 57% 0.00%
go.viam.com/rdk/data 77% 0.00%
go.viam.com/rdk/examples/customresources/demos/remoteserver 0% 0.00%
go.viam.com/rdk/grpc 25% 0.00%
go.viam.com/rdk/internal/cloud 100% 0.00%
go.viam.com/rdk/ml 67% 0.00%
go.viam.com/rdk/ml/inference 71% 0.00%
go.viam.com/rdk/module 76% 0.00%
go.viam.com/rdk/module/modmanager 81% 0.00%
go.viam.com/rdk/motionplan 70% -0.10%
go.viam.com/rdk/operation 82% 0.00%
go.viam.com/rdk/pointcloud 69% 0.00%
go.viam.com/rdk/protoutils 49% 0.00%
go.viam.com/rdk/referenceframe 73% 0.00%
go.viam.com/rdk/resource 75% 0.00%
go.viam.com/rdk/rimage 78% 0.00%
go.viam.com/rdk/rimage/depthadapter 94% 0.00%
go.viam.com/rdk/rimage/transform 75% 0.00%
go.viam.com/rdk/rimage/transform/cmd/extrinsic_calibration 67% 0.00%
go.viam.com/rdk/robot 86% 0.00%
go.viam.com/rdk/robot/client 82% 0.00%
go.viam.com/rdk/robot/framesystem 66% 0.00%
go.viam.com/rdk/robot/impl 82% 0.00%
go.viam.com/rdk/robot/packages 80% 0.00%
go.viam.com/rdk/robot/server 55% 0.00%
go.viam.com/rdk/robot/web 65% 0.00%
go.viam.com/rdk/robot/web/stream 87% 0.00%
go.viam.com/rdk/services/baseremotecontrol 50% 0.00%
go.viam.com/rdk/services/baseremotecontrol/builtin 82% 0.00%
go.viam.com/rdk/services/datamanager 65% 0.00%
go.viam.com/rdk/services/datamanager/builtin 86% 0.00%
go.viam.com/rdk/services/datamanager/datacapture 73% 0.00%
go.viam.com/rdk/services/datamanager/datasync 0% 0.00%
go.viam.com/rdk/services/mlmodel 83% 0.00%
go.viam.com/rdk/services/mlmodel/tflitecpu 82% 0.00%
go.viam.com/rdk/services/motion 51% 0.00%
go.viam.com/rdk/services/motion/builtin 88% 0.00%
go.viam.com/rdk/services/navigation 53% 0.00%
go.viam.com/rdk/services/sensors 81% 0.00%
go.viam.com/rdk/services/sensors/builtin 95% 0.00%
go.viam.com/rdk/services/shell 11% 0.00%
go.viam.com/rdk/services/slam 93% 0.00%
go.viam.com/rdk/services/slam/fake 90% 0.00%
go.viam.com/rdk/services/vision 35% 0.00%
go.viam.com/rdk/services/vision/colordetector 56% 0.00%
go.viam.com/rdk/services/vision/detectionstosegments 67% 0.00%
go.viam.com/rdk/services/vision/mlvision 68% 0.00%
go.viam.com/rdk/services/vision/radiusclustering 59% 0.00%
go.viam.com/rdk/session 94% 0.00%
go.viam.com/rdk/spatialmath 84% 0.00%
go.viam.com/rdk/utils 72% +0.14%
go.viam.com/rdk/vision 26% 0.00%
go.viam.com/rdk/vision/chess 80% 0.00%
go.viam.com/rdk/vision/delaunay 87% 0.00%
go.viam.com/rdk/vision/keypoints 92% 0.00%
go.viam.com/rdk/vision/objectdetection 82% 0.00%
go.viam.com/rdk/vision/odometry 60% 0.00%
go.viam.com/rdk/vision/odometry/cmd 0% 0.00%
go.viam.com/rdk/vision/segmentation 49% 0.00%
go.viam.com/rdk/web/server 26% 0.00%
Summary 65% (21546 / 33030) -0.04%

@Otterverse Otterverse merged commit a7318eb into main May 9, 2023
@Otterverse Otterverse deleted the rc-workflows branch May 9, 2023 22:52
edaniels pushed a commit that referenced this pull request May 11, 2023
bazile-clyde pushed a commit to bazile-clyde/rdk that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants