Skip to content

cicd qt test

cicd qt test #17

Workflow file for this run

# GitHub hosted runner with QEMU + Docker Buildx
# Runs Docker custom ARM64 image to compile repo and uploads binary
# Deploys to Jetson Nano via a self-hosted runner.
name: CI/CD
on:
pull_request:
branches:
- main
# for testing purposes, uncomment the following line
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Pull Jetson Nano Ubuntu Docker image
run: docker pull jmoreiraseame/jetson-nano-ubuntu:bionic
- name: Build project
run: |
docker run --rm --platform linux/arm64 \
-v ${{ github.workspace }}:/repo \
-w /repo jmoreiraseame/jetson-nano-ubuntu:bionic \
/bin/bash -c "
mkdir -p /repo/ClusterDisplay/build && \
cd /repo/ClusterDisplay/build && \
cmake .. && \
make && \
mkdir -p /repo/bin && \
cp jetson06 /repo/bin/ && \
ldd jetson06
"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: bin/jetson06
deploy:
runs-on: [seame] # change delivery runner flag here
needs: build
steps:
- name: Ensure target directory exists
run: mkdir -p ./team06/bin
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifact
path: ./bin
- name: SSH to Jetson and copy binary
run: |
sshpass -p "${{ secrets.JETSON_PASSWORD }}" \
scp -r ./bin \
team06@10.21.221.56:/home/team06/
- name: SSH to Jetson and run binary
run: |
sshpass -p "${{ secrets.JETSON_PASSWORD }}" \
ssh team06@10.21.221.56 'chmod +x /home/team06/bin/jetson06 && /home/team06/bin/jetson06'