1---
2# Suggested tools that can save round-trips to github and a lot of time:
3#
4# yamllint .travis.yml
5# ~/.gem/ruby/2.7.0/bin/travis lint .travis.yml
6# yaml merge-expand .travis.yml exp.yml && diff -b -u .travis.yml exp.yml
7
8language: c
9# Ubuntu 20.04 LTS
10dist: focal
11
12git:
13  depth: false
14
15services:
16  - docker
17
18# We don't need the strict sequence of stages; for now we use stages
19# only as presentation labels. Nothing in stage "tests" will run if
20# anything in buildonly fails; in the future we may want to get rid of
21# stages.
22stages:
23  - buildonly
24  - tests
25
26
27# 'name:'-less jobs appear with their env, e.g.: PLATFORM=tgl
28jobs:
29  include:
30
31    # stage buildonly
32
33    - &build-platform
34      stage: buildonly
35      before_install:
36        &docker-pull-sof
37        docker pull thesofproject/sof && docker tag thesofproject/sof sof
38      script:
39        ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -r $PLATFORM
40      env: PLATFORM='jsl'
41
42    - <<: *build-platform
43      env: PLATFORM='sue'
44
45    - <<: *build-platform
46      env: PLATFORM='tgl'
47
48    - <<: *build-platform
49      env: PLATFORM='tgl-h'
50
51    - name: "./scripts/build-tools.sh Release"
52      before_install: *docker-pull-sof
53      script: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh ./scripts/build-tools.sh
54
55    # stage tests
56
57    - &qemuboottest
58      stage: tests
59      script:
60        - echo CONFIG_HAVE_AGENT=n > src/arch/xtensa/configs/override/no-agent.config
61        - ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -o no-agent -r $PLATFORM
62        - ./scripts/docker-qemu.sh ../sof.git/scripts/qemu-check.sh $PLATFORM
63      env: PLATFORM='byt cht'
64      before_install:
65        - *docker-pull-sof
66        - docker pull thesofproject/sofqemu &&
67            docker tag thesofproject/sofqemu sofqemu
68
69    - <<: *qemuboottest
70      env: PLATFORM='bdw hsw'
71
72    - <<: *qemuboottest
73      env: PLATFORM='apl skl kbl'
74
75    - <<: *qemuboottest
76      env: PLATFORM='cnl icl'
77
78    - <<: *qemuboottest
79      env: PLATFORM='imx8 imx8x imx8m'
80
81
82    - name: testbench
83      before_install: *docker-pull-sof
84      script:
85        # testbench needs some topologies
86        - ./scripts/docker-run.sh ./scripts/build-tools.sh -t
87        - ./scripts/docker-run.sh ./scripts/rebuild-testbench.sh
88        - ./scripts/host-testbench.sh
89
90
91    - name: doxygen
92
93      before_install: sudo apt-get -y install ninja-build doxygen graphviz
94
95      script:
96
97        # Show ALL warnings. Warnings don't cause doxygen to fail (yet).
98        - mkdir -p doxybuild && pushd doxybuild && cmake -GNinja -S ../doc &&
99             ninja -v doc
100        - popd
101
102        # Build again (it's very quick) and report a failure in Travis if
103        # any issue. This time doxygen stops on the first issue.
104        - printf 'WARN_AS_ERROR = YES\n' >> doc/sof.doxygen.in
105        - ninja -C doxybuild -v doc
106
107notifications:
108  irc:
109    channels:
110      - "chat.freenode.net#sof"
111    on_success: always
112    on_failure: always
113