1---
2# Tools that can save round-trips to github and a lot of time:
3#
4# yamllint -f parsable this.yml
5# pip3 install ruamel.yaml.cmd
6# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml
7#
8# github.com also has a powerful web editor that can be used without
9# committing.
10
11name: installer
12
13# 'workflow_dispatch' allows running this workflow manually from the
14# 'Actions' tab
15# yamllint disable-line rule:truthy
16on: [push, pull_request, workflow_dispatch]
17
18jobs:
19  checktree:
20    runs-on: ubuntu-20.04
21    steps:
22      - uses: actions/checkout@v2
23        # From time to time this will catch a git tag and change SOF_VERSION
24        with: {fetch-depth: 50, submodules: recursive}
25
26      - name: docker
27        run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
28
29      # -j3 tests the ability to build multiple platforms
30      # concurrently. It makes the build log unreadable but that's OK
31      # because we have other, slower actions with readable logs.
32      - name: build all and stage
33        run: ./scripts/docker-run.sh make -j3 -C installer/ stage
34
35      - name: check staging tree
36        run: make -C installer/ checktree
37
38      - name: test make cleanall
39        run: |
40           make -C installer cleanall
41           # Make sure there's nothing left
42           rm -rf scripts/kconfig/__pycache__/
43           ! git status --porcelain --ignored | grep .
44