Repository navigation
128 lines (122 loc) · 4.52 KB
/
Copy pathci.yml
File metadata and controls
128 lines (122 loc) · 4.52 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# SPDX-License-Identifier: Apache-2.0
# Copyright 2026 Junior Deogracias
#
# This file is part of EmbLink Studio, the IDE for EmbLinkRTOS.
# Licensed under the Apache License, Version 2.0; see the LICENSE file at the repository root.
#
# S0's acceptance (spec section 8): build and test on Windows, Linux and macOS; initialize
# succeeds; the notices list is generated. S1's: the core opens the RTOS's nucleo_f446re and
# pico2_w boards and reports the generator's errors with their locations, against the RTOS
# checked out at a pinned commit.
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
core:
name: Core (${{ matrix.os }}, Python ${{ matrix.python }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-15]
python: ["3.11", "3.13"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- run: python -m pip install -e "core[dev]"
- run: ruff check core tools
- run: ruff format --check core tools
- name: EmbLinkRTOS, for stage S1's acceptance tests
uses: actions/checkout@v7
with:
repository: EmbLinkOs/EmbLinkRTOS
# The RTOS revision the core is tested against. Raise it with the hw.json and
# diagnostics formats the core supports (core/src/emblink_studio_core/rtos.py).
ref: a2cb045cf27a0f53bc53ce110d3bffc4d381817f
path: rtos
persist-credentials: false
- run: python -m pytest core -q
env:
EMBLINK_STUDIO_TEST_RTOS: ${{ github.workspace }}/rtos
- name: Notices list and licence check
run: python tools/notices.py --components third_party/components.json --pyproject core/pyproject.toml
app:
name: App (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-15]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- run: python -m pip install ninja
- name: Install Qt
uses: jurplel/install-qt-action@v4
timeout-minutes: 15
with:
# The release target is Qt 6.8 LTS (spec section 9). Check which 6.8 patch releases
# are published under the LGPL before raising this.
version: "6.8.3"
cache: true
- name: Linux build dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev libxkbcommon-dev libxcb1-dev
- name: MSVC environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- run: cmake --preset dev
- run: cmake --build --preset dev
- name: EmbLinkRTOS, for stage S2's golden test
uses: actions/checkout@v7
with:
repository: EmbLinkOs/EmbLinkRTOS
# The same revision as the core's acceptance tests.
ref: a2cb045cf27a0f53bc53ce110d3bffc4d381817f
path: rtos
persist-credentials: false
- run: ctest --preset dev
env:
EMBLINK_STUDIO_TEST_RTOS: ${{ github.workspace }}/rtos
- name: Failed tests, again, with their full output
if: failure()
run: ctest --preset dev --rerun-failed --extra-verbose
env:
EMBLINK_STUDIO_TEST_RTOS: ${{ github.workspace }}/rtos
format:
name: clang-format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- run: clang-format-18 --dry-run --Werror $(git ls-files 'app/*.cpp' 'app/*.h')
dco:
name: DCO sign-off
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Every commit is signed off by its author
run: |
status=0
for c in $(git rev-list --no-merges "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"); do
who="$(git show -s --format='%an <%ae>' "$c")"
# Dependabot cannot sign off; its updates are reviewed before they are merged.
case "$who" in "dependabot[bot] <"*) continue ;; esac
if ! git show -s --format=%B "$c" | grep -qF "Signed-off-by: $who"; then
echo "::error::commit $c has no 'Signed-off-by: $who'"
status=1
fi
done
exit $status