Skip to content

Commit

Permalink
Add GitHub CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
tronical committed Apr 4, 2024
1 parent b79422a commit 56544f1
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build_container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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}}

0 comments on commit 56544f1

Please sign in to comment.