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
# self hoste runner on lab machine that compiles repo with qemu + docker buildx and uploads binary to jetson nano via ssh because its on the same network | |
name: lab build | |
on: | |
push: #needed for testing on this branch | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment' | |
required: true | |
default: 'lab' | |
# runner labeled x64, or i can specify the name of the runner instead | |
jobs: | |
build: | |
runs-on: [X64] | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: setup docker qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: setup docker buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: pull jetson nano ubuntu docker image | |
run: docker pull jmoreiraseame/jetson-nano-ubuntu:1.0 | |
- name: build project | |
run: | | |
docker run --rm --platform linux/arm64 -v ${{ github.workspace }}:/repo -w /repo jmoreiraseame/jetson-nano-ubuntu:1.0 /bin/bash -c " | |
echo '/repo:' && \ | |
ls -la /repo && \ | |
mkdir /repo/xc/xctest/build && \ | |
cd /repo/xc/xctest/build && \ | |
cmake .. && \ | |
make && \ | |
mkdir /repo/bin && \ | |
cp test /repo/bin/ && \ | |
ldd test | |
" | |
- name: install sshpass | |
run: sudo apt-get install -y sshpass | |
- name: ssh to jetson and copy binary | |
run: | | |
sshpass -p "${{ secrets.JETSON_PASSWORD }}" scp -r bin/ team06@10.21.221.56:/home/team06/ |