forked from viamrobotics/rdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RSDK-2996 Release Candidate Workflows (viamrobotics#2336)
- Loading branch information
1 parent
cfe185d
commit f66fe12
Showing
16 changed files
with
239 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ name: Build AppImage | |
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
release_type: | ||
required: true | ||
type: string | ||
secrets: | ||
GCP_CREDENTIALS: | ||
required: true | ||
|
@@ -25,10 +29,10 @@ jobs: | |
options: --platform ${{ matrix.platform }} | ||
timeout-minutes: 15 | ||
outputs: | ||
date: ${{ steps.build_test_app.outputs.date }} | ||
date: ${{ steps.build_date.outputs.date }} | ||
|
||
steps: | ||
- name: Check out main branch code | ||
- name: Check out code | ||
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' | ||
uses: actions/checkout@v3 | ||
with: | ||
|
@@ -68,23 +72,44 @@ jobs: | |
gzip: false | ||
|
||
- name: Build and Package (Latest) | ||
id: build_test_app | ||
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' | ||
if: inputs.release_type == 'latest' | ||
run: | | ||
echo "date=`date +%F`" >> $GITHUB_OUTPUT | ||
sudo -Hu testbot bash -lc 'make BUILD_CHANNEL="latest" appimage' | ||
- name: Build and Package (Tagged) | ||
if: inputs.release_type == 'stable' || inputs.release_type == 'rc' | ||
run: | | ||
sudo -Hu testbot bash -lc 'make RELEASE_TYPE="${{ inputs.release_type }}" BUILD_CHANNEL="${{ github.ref_name }}" appimage' | ||
- name: Set Date | ||
id: build_date | ||
run: echo "date=`date +%F`" >> $GITHUB_OUTPUT | ||
|
||
- 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 }}/' | ||
glob: '*' | ||
parent: false | ||
gzip: false | ||
|
||
output_summary: | ||
name: Output Summary | ||
runs-on: ubuntu-latest | ||
needs: appimage | ||
if: contains(github.event.pull_request.labels.*.name, 'appimage') || contains(github.event.pull_request.labels.*.name, 'appimage-ignore-tests') | ||
steps: | ||
- name: Display Download Links | ||
run: | | ||
channel="pr-${{ github.event.pull_request.number }}" | ||
echo "### Built AppImages for ${channel}" >> $GITHUB_STEP_SUMMARY | ||
echo "- arm64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-aarch64.AppImage" >> $GITHUB_STEP_SUMMARY | ||
echo "- x86_64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-x86_64.AppImage" >> $GITHUB_STEP_SUMMARY | ||
echo "" >> $GITHUB_STEP_SUMMARY | ||
appimage_test: | ||
name: AppImage Test | ||
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' | ||
|
@@ -106,10 +131,15 @@ jobs: | |
- name: Test AppImage | ||
run: | | ||
channel="${{ github.ref_name }}" | ||
# we call our main branch releases "latest" | ||
if [ "$channel" = "main" ]; then | ||
channel="latest" | ||
fi | ||
export TEST_DIR=`mktemp -d -t test-viam-server-XXXXXX` | ||
cd $TEST_DIR | ||
curl -o viam-server https://storage.googleapis.com/packages.viam.com/apps/viam-server/testing/appimage/${{ needs.appimage.outputs.date }}/${{ github.sha }}/viam-server-latest-`uname -m`.AppImage | ||
curl -o viam-server https://storage.googleapis.com/packages.viam.com/apps/viam-server/testing/appimage/${{ needs.appimage.outputs.date }}/${{ github.sha }}/viam-server-${channel}-`uname -m`.AppImage | ||
chmod 755 viam-server | ||
export RAND_PORT=$((30000 + $RANDOM)) | ||
|
@@ -141,3 +171,15 @@ jobs: | |
- name: Publish AppImage | ||
run: | | ||
gsutil mv "gs://packages.viam.com/apps/viam-server/testing/appimage/${{ needs.appimage_test.outputs.date }}/${{ github.sha }}/*" "gs://packages.viam.com/apps/viam-server/" | ||
- name: Output Summary | ||
run: | | ||
channel="${{ github.ref_name }}" | ||
# we call our main branch releases "latest" | ||
if [ "$channel" == "main" ]; then | ||
channel="latest" | ||
fi | ||
echo "### Built AppImages for ${channel}" >> $GITHUB_STEP_SUMMARY | ||
echo "- arm64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-aarch64.AppImage" >> $GITHUB_STEP_SUMMARY | ||
echo "- x86_64: https://storage.googleapis.com/packages.viam.com/apps/viam-server/viam-server-${channel}-x86_64.AppImage" >> $GITHUB_STEP_SUMMARY | ||
echo "" >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build and Publish RC | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+' | ||
|
||
# To test workflow updates you need to work in a branch directly on viamrobotics/rdk | ||
# and tag your working branch instead of @main in any viamrobotics/rdk "uses" below. | ||
# Don't forget to tag back to @main before merge. | ||
|
||
jobs: | ||
test: | ||
uses: viamrobotics/rdk/.github/workflows/test.yml@main | ||
secrets: | ||
MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }} | ||
|
||
appimage: | ||
needs: test | ||
uses: viamrobotics/rdk/.github/workflows/appimage.yml@main | ||
with: | ||
release_type: 'rc' | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
|
||
staticbuild: | ||
needs: test | ||
uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main | ||
with: | ||
release_type: 'rc' | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and Publish Stable | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
# To test workflow updates you need to work in a branch directly on viamrobotics/rdk | ||
# and tag your working branch instead of @main in any viamrobotics/rdk "uses" below. | ||
# Don't forget to tag back to @main before merge. | ||
|
||
jobs: | ||
test: | ||
uses: viamrobotics/rdk/.github/workflows/test.yml@main | ||
secrets: | ||
MONGODB_TEST_OUTPUT_URI: ${{ secrets.MONGODB_TEST_OUTPUT_URI }} | ||
|
||
appimage: | ||
needs: test | ||
uses: viamrobotics/rdk/.github/workflows/appimage.yml@main | ||
with: | ||
release_type: 'stable' | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
|
||
staticbuild: | ||
needs: test | ||
uses: viamrobotics/rdk/.github/workflows/staticbuild.yml@main | ||
with: | ||
release_type: 'stable' | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
|
||
slack-workflow-status: | ||
if: ${{ failure() }} | ||
name: Post Workflow Status To Slack | ||
needs: | ||
- test | ||
- appimage | ||
- staticbuild | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: 'read' | ||
steps: | ||
- name: Slack Workflow Notification | ||
uses: Gamesight/slack-workflow-status@master | ||
with: | ||
repo_token: ${{secrets.GITHUB_TOKEN}} | ||
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}} | ||
channel: '#team-devops' | ||
name: 'Workflow Status' |
Oops, something went wrong.