Don't use canon in CI #89
Workflow file for this run
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
name: Build & publish module to registry | |
on: [push, pull_request] | |
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 sh -c "(TARGET_OS=${{ matrix.target_os }} TARGET_ARCH=${{ matrix.target_arch }} make module)" | |
else | |
TARGET_OS=${{ matrix.target_os }} TARGET_ARCH=${{ matrix.target_arch }} make module | |
fi | |
- name: Check if module.tar.gz exists recursively | |
run: | | |
if find . -name module.tar.gz | grep -q .; then | |
echo "module.tar.gz exists" | |
else | |
echo "module.tar.gz does not exist" | |
exit 1 | |
fi | |
# - name: Upload viamrtsp module to registry | |
# uses: viamrobotics/upload-module@v1 | |
# with: | |
# meta-path: meta.json | |
# module-path: module.tar.gz | |
# platform: ${{ matrix.platform }} | |
# version: 0.1.8-rc0 | |
# key-id: ${{ secrets.VIAM_DEV_API_KEY_ID }} | |
# key-value: ${{ secrets.VIAM_DEV_API_KEY }} |