-
Notifications
You must be signed in to change notification settings - Fork 22
93 lines (90 loc) · 3.2 KB
/
main.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# ---------------------------------------------------------------------------
# CI workflows for MTDA
# ---------------------------------------------------------------------------
#
# This software is a part of MTDA.
# Copyright (C) 2024 Siemens Digital Industries Software
#
# ---------------------------------------------------------------------------
# SPDX-License-Identifier: MIT
# ---------------------------------------------------------------------------
name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
types: [ labeled ]
jobs:
lint:
name: Check code for issues
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: tox
run: |
sudo apt install -y build-essential libsystemd-dev
pip3 install --user tox
tox -s
kas-ci:
name: Build kas/ci targets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free Disk Space
uses: ./.github/workflows/free-disk-space
- name: Cache downloads and sstate
uses: actions/cache@v4
with:
key: ${{ hashFiles('debian/changelog') }}
path: |
build/downloads
build/sstate-cache
- name: Build Fast CI targets
if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v')
run: |
./kas-container build kas/ci/fast.yml
- name: Build Full CI targets
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
run: |
./kas-container build kas/ci/full.yml
- name: Upload NanoPI images
uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: mtda-nanopi-images
path: |
build/tmp/deploy/images/nanopi-*/mtda-image-mtda-*-nanopi-*.wic
build/tmp/deploy/images/nanopi-*/mtda-image-mtda-*-nanopi-*.wic.bmap
- name: Upload BeagleBone Black images
uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: mtda-bbb-images
path: |
build/tmp/deploy/images/beaglebone-*/mtda-image-mtda-*-beaglebone-*.wic
build/tmp/deploy/images/beaglebone-*/mtda-image-mtda-*-beaglebone-*.wic.bmap
- name: Publish Debian packages to Gemfury
env:
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }}
if: startsWith(github.ref, 'refs/tags/v')
run: |
find build/tmp/deploy/isar-apt/mtda-bookworm-* -name '*.deb' -print | while read p; do
curl -F package=@${p} https://{$GEMFURY_PUSH_TOKEN}@push.fury.io/mtda/;
done
- name: Import GPG key
if: startsWith(github.ref, 'refs/tags/v')
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Upload source packages to PPA
if: startsWith(github.ref, 'refs/tags/v')
run: |
sudo apt install -y devscripts dh-python equivs python3-sphinx
./scripts/build-using-ppa ${PWD}/build jammy