Skip to content

Rust Demo built for Torizon #1

Rust Demo built for Torizon

Rust Demo built for Torizon #1

# Copyright © SixtyFPS GmbH <[email protected]>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
name: Rust Demo built for Torizon
on:
workflow_dispatch:
inputs:
push:
type: boolean
description: "Push the built images"
workflow_call:
inputs:
push:
type: boolean
description: "Push the built images"
jobs:
build_containers:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
# - target: armhf
# image_arch: linux/arm/v7
# rust_toolchain_arch: armv7-unknown-linux-gnueabihf
# base_image_suffix: ""
# - target: arm64
# image_arch: linux/arm64
# rust_toolchain_arch: aarch64-unknown-linux-gnu
# base_image_suffix: ""
# - target: armhf
# image_arch: linux/arm/v7
# rust_toolchain_arch: armv7-unknown-linux-gnueabihf
# base_image_suffix: "-vivante"
- target: arm64
image_arch: linux/arm64
rust_toolchain_arch: aarch64-unknown-linux-gnu
base_image_suffix: "-vivante"
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event.inputs.push || inputs.push }}
tags: ghcr.io/slint-ui/slint/torizon-robo-demo-${{matrix.target}}${{matrix.base_image_suffix}}:latest
platforms: ${{matrix.image_arch}}
build-args: |
TOOLCHAIN_ARCH=${{matrix.target}}
IMAGE_ARCH=${{matrix.image_arch}}
RUST_TOOLCHAIN_ARCH=${{matrix.rust_toolchain_arch}}
BASE_NAME=wayland-base${{matrix.base_image_suffix}}
WEATHER_API_KEY=${{secrets.WEATHER_API_KEY}}