Repository navigation
97 lines (83 loc) · 3.22 KB
/
Copy pathvalidator.yml
File metadata and controls
97 lines (83 loc) · 3.22 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
---
# SPDX-License-Identifier: BSD-3-Clause
name: SOF Topology Validator
# yamllint disable-line rule:truthy
on: [pull_request, push, workflow_dispatch, workflow_call]
permissions: {}
concurrency:
group: "${{ github.workflow }}-${{ github.event_name }}-\
${{ github.event_name == 'pull_request' && github.ref || github.run_id }}"
cancel-in-progress: true
jobs:
validator-unit-and-schema:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: sof-topologies
persist-credentials: false
- name: Install Python test dependencies
run: |
sudo apt-get update
sudo apt-get -y install python3-construct python3-pytest
- name: Cross-check topology2 tokens against kernel schema (advisory)
continue-on-error: true
run: |
python3 sof-topologies/validator/schema/check_tokens_conf.py -v
- name: Run validator unit tests
run: |
pytest -v sof-topologies/validator/tests
validator-integration:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: sof-topologies
persist-credentials: false
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get -y install ninja-build cmake m4 \
automake autoconf libtool gettext libasound2-dev \
pkg-config python3-construct python3-pytest
- name: Install autoconf 2.72
run: |
cd "${GITHUB_WORKSPACE}"
wget -q https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.gz
tar xf autoconf-2.72.tar.gz
cd autoconf-2.72
./configure --prefix=/usr/local
make -j"$(nproc)"
sudo make install
hash -r
- name: Build ALSA lib & utils (alsatplg)
run: |
SOF_WORKSPACE="${GITHUB_WORKSPACE}" \
./sof-topologies/scripts/build-alsa-tools.sh
- name: Run validator pytest suite (with alsatplg)
env:
ALSATPLG: ${{ github.workspace }}/tools/bin/alsatplg
run: |
pytest -v sof-topologies/validator/tests
- name: Build & validate all topology2 binaries (TPLG_VALIDATE=ON)
run: |
cmake -GNinja -S "${GITHUB_WORKSPACE}/sof-topologies" \
-B "${GITHUB_WORKSPACE}/build-validate" \
-DALSATPLG_CMD="${GITHUB_WORKSPACE}/tools/bin/alsatplg" \
-DBUILD_TOPOLOGY1=OFF \
-DBUILD_TOPOLOGY2=ON \
-DBUILD_DEV_TOPOLOGIES=ON \
-DTPLG_VALIDATE=ON
cmake --build "${GITHUB_WORKSPACE}/build-validate" \
--target topologies2 -j"$(nproc)"
find "${GITHUB_WORKSPACE}/build-validate/topology2/production" \
"${GITHUB_WORKSPACE}/build-validate/topology2/development" \
-maxdepth 1 -name "*.tplg" -print0 \
| xargs -0 python3 \
"${GITHUB_WORKSPACE}/sof-topologies/validator/tplg_validate.py" \
--waivers \
"${GITHUB_WORKSPACE}/sof-topologies/validator/known-issues.txt"