mirror of https://github.com/thesofproject/sof.git
.github: add Zephyr build
Use the official image from the Zephyr project https://github.com/zephyrproject-rtos/docker-image Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
33c5f5d38e
commit
014a386dfb
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
name: Zephyr
|
||||||
|
|
||||||
|
# 'workflow_dispatch' allows running this workflow manually from the
|
||||||
|
# 'Actions' tab
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zephyr-build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
# From time to time this will catch a git tag and change SOF_VERSION
|
||||||
|
with: {fetch-depth: 10, submodules: recursive}
|
||||||
|
|
||||||
|
- name: yamllint ourselves
|
||||||
|
run: yamllint .github/workflows/zephyr.yml
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
run: docker run -v "$(pwd)":/workdir
|
||||||
|
docker.io/zephyrprojectrtos/zephyr-build:latest
|
||||||
|
./zephyr/docker-build.sh
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# Copyright(c) 2021 Intel Corporation. All rights reserved.
|
||||||
|
|
||||||
|
# "All problems can be solved by another level of indirection"
|
||||||
|
# Ideally, this script would not be needed.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# export http_proxy=...
|
||||||
|
# export https_proxy=...
|
||||||
|
|
||||||
|
unset ZEPHYR_BASE
|
||||||
|
|
||||||
|
sudo --preserve-env=http_proxy,https_proxy apt-get update
|
||||||
|
sudo --preserve-env=http_proxy,https_proxy apt-get -y install libssl-dev
|
||||||
|
|
||||||
|
# Make sure we're in the right place; chgrp -R below.
|
||||||
|
test -e ./scripts/xtensa-build-zephyr.sh
|
||||||
|
|
||||||
|
if test -e zephyrproject; then
|
||||||
|
./scripts/xtensa-build-zephyr.sh -a
|
||||||
|
else
|
||||||
|
# Matches docker.io/zephyrprojectrtos/zephyr-build:latest gid
|
||||||
|
ls -ln | head
|
||||||
|
stat .
|
||||||
|
sudo chgrp -R 1000 .
|
||||||
|
sudo chmod -R g+rwX .
|
||||||
|
./scripts/xtensa-build-zephyr.sh -a -c
|
||||||
|
fi
|
Loading…
Reference in New Issue