Don't use canon in CI #90
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 | |
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache | |
- platform: linux/arm64 | |
runner: buildjet-8vcpu-ubuntu-2204-arm | |
target_os: linux | |
target_arch: arm64 | |
docker_image: ghcr.io/viamrobotics/antique2:arm64-cache | |
- platform: android/arm64 | |
runner: ubuntu-latest | |
target_os: android | |
target_arch: arm64 | |
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache | |
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: Pull Docker image | |
run: docker pull ${{ matrix.docker_image }} | |
- name: Build and package using Docker | |
run: | | |
docker run --rm \ | |
-e TARGET_OS=${{ matrix.target_os }} \ | |
-e TARGET_ARCH=${{ matrix.target_arch }} \ | |
-v "$(pwd):/workspace" \ | |
-w /workspace \ | |
${{ matrix.docker_image }} \ | |
sh -c "make module" | |
- 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 }} |