RSDK-5745 - Add build system and CI for RPI appimage/module #70
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 Latest | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
paths-ignore: | ||
- 'README.md' | ||
jobs: | ||
appimage: | ||
name: AppImage Build | ||
strategy: | ||
matrix: | ||
include: | ||
- container: ghcr.io/seanavery/viam-cpp-base:0.0.2 | ||
TARGET: jetson | ||
- container: ghcr.io/seanavery/viam-cpp-base-pi:0.0.2 | ||
TARGET: pi | ||
container: | ||
image: ${{ matrix.container }} | ||
options: --platform linux/arm64 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set TARGET environment variable | ||
run: echo "TARGET=${{ matrix.TARGET }}" >> $GITHUB_ENV | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Clean build artifacts | ||
run: make clean | ||
- name: Install module dependencies | ||
run: make dep | ||
- name: Build viam-csi binary | ||
run: make build | ||
- name: Build viam-csi appimage | ||
run: make package | ||
- name: Copy binary and appimage to bin folder | ||
run: make bin | ||
- name: Run appimage in freshinstance | ||
run: | | ||
make image-test | ||
make test-package | ||
- name: Authorize GCP upload | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | ||
- name: Deploy Files | ||
uses: google-github-actions/upload-cloud-storage@v0.10.4 | ||
with: | ||
headers: "cache-control: no-cache" | ||
path: 'bin' | ||
destination: 'packages.viam.com/apps/csi-camera/${{ env.TARGET }}' | ||
glob: '*aarch64*' | ||
parent: false | ||
gzip: false | ||
# TODO: Run cpp tests |