Skip to content

Commit 153fbbf

Browse files
committed
.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>
1 parent 78eca94 commit 153fbbf

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/zephyr.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
3+
name: Zephyr
4+
5+
# 'workflow_dispatch' allows running this workflow manually from the
6+
# 'Actions' tab
7+
# yamllint disable-line rule:truthy
8+
on: [push, pull_request, workflow_dispatch]
9+
10+
jobs:
11+
zephyr-build:
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- uses: actions/checkout@v2
15+
# From time to time this will catch a git tag and change SOF_VERSION
16+
with: {fetch-depth: 10, submodules: recursive}
17+
18+
- name: yamllint ourselves
19+
run: yamllint .github/workflows/zephyr.yml
20+
21+
- name: build
22+
run: docker run -v "$(pwd)":/workdir
23+
docker.io/zephyrprojectrtos/zephyr-build:latest
24+
./zephyr/docker-build.sh

zephyr/docker-build.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
# Copyright(c) 2021 Intel Corporation. All rights reserved.
4+
5+
# "All problems can be solved by another level of indirection"
6+
# Ideally, this script would not be needed.
7+
8+
set -e
9+
set -x
10+
11+
# export http_proxy=...
12+
# export https_proxy=...
13+
14+
unset ZEPHYR_BASE
15+
16+
sudo --preserve-env=http_proxy,https_proxy apt-get update
17+
sudo --preserve-env=http_proxy,https_proxy apt-get -y install libssl-dev
18+
19+
# Make sure we're in the right place; chgrp -R below.
20+
test -e ./scripts/xtensa-build-zephyr.sh
21+
22+
if test -e zephyrproject; then
23+
./scripts/xtensa-build-zephyr.sh -a
24+
else
25+
# Matches docker.io/zephyrprojectrtos/zephyr-build:latest gid
26+
ls -ln | head
27+
stat .
28+
sudo chgrp -R 1000 .
29+
sudo chmod -R g+rwX .
30+
./scripts/xtensa-build-zephyr.sh -a -c
31+
fi

0 commit comments

Comments
 (0)