Skip to content

Improve CI (#151)

Improve CI (#151) #32

Workflow file for this run

---
on:
workflow_dispatch:
pull_request:
push:
name: Build
env:
L4T32_BSP: 32.7.4
L4T35_BSP: 35.5.0
L4T36_BSP: 36.3.0
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# Ubuntu 22.04 + L4T 32 (Nano family)
- ubuntu: "22.04"
board: "jetson-nano"
revision: "300"
l4t_version: "32"
l4t_bsp: ${L4T32_BSP}
- ubuntu: "22.04"
board: "jetson-nano"
revision: "200"
l4t_version: "32"
l4t_bsp: ${L4T32_BSP}
- ubuntu: "22.04"
board: "jetson-nano"
revision: "100"
l4t_version: "32"
l4t_bsp: ${L4T32_BSP}
- ubuntu: "22.04"
board: "jetson-nano-2gb"
l4t_version: "32"
l4t_bsp: ${L4T32_BSP}
# Ubuntu 24.04 + L4T 36 (Orin family)
- ubuntu: "24.04"
board: "jetson-orin-nano"
device: "SD"
l4t_version: "36"
l4t_bsp: ${L4T36_BSP}
- ubuntu: "24.04"
board: "jetson-orin-nano"
device: "USB"
l4t_version: "36"
l4t_bsp: ${L4T36_BSP}
# Ubuntu 22.04 + L4T 35 (Xavier family)
- ubuntu: "22.04"
board: "jetson-agx-xavier"
device: "SD"
l4t_version: "35"
l4t_bsp: ${L4T35_BSP}
- ubuntu: "22.04"
board: "jetson-agx-xavier"
device: "USB"
l4t_version: "35"
l4t_bsp: ${L4T35_BSP}
- ubuntu: "22.04"
board: "jetson-xavier-nx"
device: "SD"
l4t_version: "35"
l4t_bsp: ${L4T35_BSP}
- ubuntu: "22.04"
board: "jetson-xavier-nx"
device: "USB"
l4t_version: "35"
l4t_bsp: ${L4T35_BSP}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install just
uses: taiki-e/install-action@just
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y podman qemu-user-static pigz
sudo systemctl start systemd-binfmt.service
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- name: Create rootfs
run: just build-jetson-rootfs ${{ matrix.ubuntu }}
- name: Build jetson image
run: |
just build-jetson-image \
-b ${{ matrix.board }} \
${{ matrix.revision && format('-r {0}', matrix.revision) || '' }} \
${{ matrix.device && format('-d {0}', matrix.device) || '' }} \
${{ matrix.l4t_version && format('-l {0}', matrix.l4t_version) || '' }}
IMAGE_NAME="${{ matrix.board }}"
[[ -n "${{ matrix.revision }}" ]] && IMAGE_NAME="${IMAGE_NAME}-${{ matrix.revision }}"
[[ -n "${{ matrix.device }}" ]] && IMAGE_NAME="${IMAGE_NAME}_${{ matrix.device }}"
IMAGE_NAME="${IMAGE_NAME}-${{ matrix.ubuntu }}-${{ matrix.l4t_bsp }}"
echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_ENV
mv jetson.img "${IMAGE_NAME}.img"
pigz "${IMAGE_NAME}.img"
ls -lht "${IMAGE_NAME}.img.gz"
- name: Upload artifact
uses: actions/upload-artifact@v4
timeout-minutes: 120
with:
name: ${{ env.IMAGE_NAME }}
path: "jetson*"
if-no-files-found: error
retention-days: 7
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: |
[CHANGELOG.md](${{ github.server_url }}/${{ github.repository }}/blob/master/CHANGELOG.md)
files: ${{ env.IMAGE_NAME }}