forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 2.23 KB
/
embedded_build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright © SixtyFPS GmbH <[email protected]>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
name: Embedded Build
on:
workflow_dispatch:
jobs:
build_containers:
runs-on: ubuntu-20.04
strategy:
matrix:
target:
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- x86_64-unknown-linux-gnu
env:
SLINT_NO_QT: 1
SLINT_STYLE: fluent
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- 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@v2
with:
context: .
file: ./docker/Dockerfile.${{ matrix.target }}
push: true
tags: ghcr.io/slint-ui/slint/${{matrix.target}}:latest
build:
needs: [build_containers]
runs-on: ubuntu-20.04
strategy:
matrix:
target:
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup-rust
with:
target: ${{ matrix.target }}
- name: Enable Skia build
if: matrix.target != 'riscv64gc-unknown-linux-gnu'
run: |
echo "EXTRA_ARGS=--features slint/renderer-winit-skia" >> $GITHUB_ENV
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }} --workspace --exclude slint-node --exclude mcu-board-support --exclude printerdemo_mcu ${{ env.EXTRA_ARGS }}
- name: "Upload printerdemo artifact"
uses: actions/upload-artifact@v2
with:
name: printerdemo-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/printerdemo
target/${{ matrix.target }}/release/todo
target/${{ matrix.target }}/release/gallery
target/${{ matrix.target }}/release/viewer