-
Notifications
You must be signed in to change notification settings - Fork 6
82 lines (71 loc) · 2.4 KB
/
build.yml
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
# Copyright (c) 2024 Linaro LTD
# SPDX-License-Identifier: Apache-2.0
name: Build
# Build the rust samples and tests using the current Zephyr.
on:
push:
branches:
- main
- v*-branch
pull_request:
branches:
- main
- v*-branch
schedule:
- cron: "0 0 * * *"
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
env:
WGET_ARGS: "-q"
RENODE_VERSION: "1.15.3"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: apptest
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: apptest
manifest-file-name: ci-manifest.yml
toolchains: arm-zephyr-eabi:riscv64-zephyr-elf
- name: Install Rust Targets
shell: bash
run: |
rustup target add riscv32i-unknown-none-elf
rustup target add riscv64imac-unknown-none-elf
rustup target add thumbv6m-none-eabi
rustup target add thumbv7em-none-eabi
rustup target add thumbv7m-none-eabi
rustup target add thumbv8m.main-none-eabi
# Note that Renode is only provided for x86_64 targets. This matches the github runners.
- name: Install Renode
shell: bash
run: |
set -e
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get -y update
wget ${WGET_ARGS} https://github.com/renode/renode/releases/download/v${RENODE_VERSION}/renode_${RENODE_VERSION}_amd64.deb
sudo apt-get install -y ./renode_${RENODE_VERSION}_amd64.deb
rm renode_${RENODE_VERSION}_amd64.deb
pip3 install -r /opt/renode/tests/requirements.txt --no-cache-dir
- name: Build firmware
working-directory: apptest
shell: bash
run: |
cargo --version
lscpu
df -h
../zephyr/scripts/twister -M all -T samples -T tests -v --inline-logs --integration -j 4 \
--timeout-multiplier 2 \
$(cat etc/platforms.txt)