Skip to content

[RSDK-7953] Consolidate build workflow for all archs part 2 #85

[RSDK-7953] Consolidate build workflow for all archs part 2

[RSDK-7953] Consolidate build workflow for all archs part 2 #85

Workflow file for this run

name: Build & publish module to registry
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
publish:
strategy:
matrix:
include:
# - platform: linux/amd64
# runner: ubuntu-latest
# target_os: linux
# target_arch: amd64
- platform: linux/arm64
runner: buildjet-8vcpu-ubuntu-2204-arm
target_os: linux
target_arch: arm64
# - platform: android/arm64
# runner: ubuntu-latest
# target_os: android
# target_arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.13
- name: Install canon (only for non-Android platforms)
if: ${{ matrix.target_os != 'android' }}
run: |
export PATH="$(go env GOPATH)/bin:$PATH"
go install github.com/viamrobotics/[email protected]
- name: Build and package
run: |
if [ "${{ matrix.target_os }}" != "android" ]; then
canon --profile viam-rtsp-antique
fi
TARGET_OS=${{ matrix.target_os }} TARGET_ARCH=${{ matrix.target_arch }} make module
- name: Upload viamrtsp module to registry
uses: viamrobotics/upload-module@main
with:
meta-path: meta.json
module-path: module.tar.gz
platform: ${{ matrix.platform }}
version: ${{ github.ref_name }}
key-id: ${{ secrets.VIAM_DEV_API_KEY_ID }}
key-value: ${{ secrets.VIAM_DEV_API_KEY }}