forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
199 lines (157 loc) · 6.2 KB
/
pull-request.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
# Tools that can save round-trips to github and a lot of time:
#
# yamllint -f parsable pull_request.yml
# pip3 install ruamel.yaml.cmd
# yaml merge-expand pull_request.yml exp.yml &&
# diff -w -u pull_request.yml exp.yml
#
# github.com also has a powerful web editor that can be used without
# committing.
# TODO: finish scattering this very old workflow to more specific
# .yml files
name: Main Actions
# yamllint disable-line rule:truthy
on:
push:
branches:
- 'main'
- 'stable-**'
- '**-stable'
pull_request:
branches:
- 'main'
- 'stable-**'
- '**-stable'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows to call this forkflow from other workflows
workflow_call:
jobs:
doxygen:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
filter: 'tree:0'
- name: apt get doxygen graphviz
run: sudo apt-get -y install ninja-build doxygen graphviz
- name: Show warnings but fail only on errors
run: cmake -GNinja -S doc -B docbuild && ninja -C docbuild -v doc
# Build again (it's very quick) so warnings don't go unnoticed.
# For older doxygen versions that don't have FAIL_ON_WARNINGS, use
# WARN_AS_ERROR = YES instead. 'YES' is inferior because it stops
# on the first error.
#
# Note some doxygen bug(s) can cause some specific error types to
# escape WARN_AS_ERROR, example:
# https://github.com/doxygen/doxygen/issues/7970 and
# https://github.com/thesofproject/sof/pull/5978
- name: Fail on warnings
run: printf
'WARN_AS_ERROR = FAIL_ON_WARNINGS\n' >> doc/sof.doxygen.in &&
ninja -C docbuild -v doc
# This is unfortunately a mix of sof-docs/.github/ + the previous job
# above, duplicating a bit of both: please keep in sync with both. We
# build sof-docs here too because waiting for sof-docs CI to find
# regressions introduced in sof.git is very time-consuming, see
# example in
# https://github.com/thesofproject/sof/pull/5731#issuecomment-1175630147
sof-docs:
runs-on: ubuntu-20.04 # sof-docs is still stuck to this for now
steps:
- uses: actions/checkout@v4
with:
filter: 'tree:0'
- name: apt-get update
run: sudo apt-get update
- name: apt-get install
run: sudo apt-get -y install
doxygen make default-jre graphviz cmake ninja-build
- name: doxygen
run: cmake -GNinja -S doc/ -B doxybuild/ && ninja -C doxybuild/ -v doc
# Nested git clone, this is fine
- name: clone sof-docs
run: git clone https://github.com/thesofproject/sof-docs sof-docs/
- name: PATH += .local/bin
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: 'pip install -r sof-docs/scripts/requirements.txt'
run: pip install -r sof-docs/scripts/requirements.txt
- name: build sof-docs
run: make -C sof-docs/ html SOF_DOC_BUILD="$(pwd)"/doxybuild/
# This is a bit redundant with the other jobs below and with the (much
# faster!) installer[.yml] but it may differ in which platforms are
# built. This makes sure platforms without any open-source toolchain
# are added in the right place and do not accidentally break the -a
# option, Docker testing etc.
gcc-build-default-platforms:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}
- name: docker
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
- name: xtensa-build-all.sh -a
run: ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -a ||
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -a -j 1
gcc-build-only:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# Use groups to avoid spamming the web interface. Pay attention
# to COMMAS. Don't use a single big group so a single failure
# does not block all other builds.
platform: [imx8ulp,
rn rmb,
mt8186 mt8195,
]
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}
- name: docker
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
- name: xtensa-build-all.sh platforms
env:
PLATFORM: ${{ matrix.platform }}
run: ./scripts/docker-run.sh
./scripts/xtensa-build-all.sh -r ${PLATFORM}
# Warning: there is a fair amount of duplication between 'build-only'
# and 'qemu-boot' because github does not support YAML anchors as of Jan
# 2021. Defining our new actions would be overkill. Another popular
# option is to generate this file from a source with YAML anchors
# before committing it; also deemed overkill for the current amount of
# duplication.
qemu-boot-test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# Compiler-based groups, see HOST= compilers in
# xtensa-build-all.sh. Pay attention to commas and whitespace.
# The main reason for these groups is to avoid the matrix
# swarming the Github web interface and burying other checks.
# See longer example above.
platform: [imx8 imx8x imx8m,
]
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}
- name: turn off HAVE_AGENT
run: echo CONFIG_HAVE_AGENT=n >
src/arch/xtensa/configs/override/no-agent.config
- name: docker SOF
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
- name: xtensa-build-all.sh -o no-agent platforms
env:
PLATFORM: ${{ matrix.platform }}
run: ./scripts/docker-run.sh
./scripts/xtensa-build-all.sh -o no-agent -r ${PLATFORM}
- name: docker QEMU
run: docker pull thesofproject/sofqemu &&
docker tag thesofproject/sofqemu sofqemu
- name: qemu-check
env:
PLATFORM: ${{ matrix.platform }}
run: ./scripts/docker-qemu.sh
../sof.git/scripts/qemu-check.sh ${PLATFORM}