-
Notifications
You must be signed in to change notification settings - Fork 15
60 lines (52 loc) · 1.63 KB
/
test.yaml
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
name: Action test
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Main Zephyr repository checkout
uses: actions/checkout@v4
with:
repository: zephyrproject-rtos/zephyr
path: zephyr
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Create Python virtual environment
run: |
python3 -m venv .venv
if [ "${{ runner.os }}" = "Windows" ]; then
.venv/Scripts/activate.bat
else
source .venv/bin/activate
fi
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV
echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH
shell: bash
- name: Setup Zephyr project
uses: ./
with:
app-path: zephyr
toolchains: all
- name: Build firmware
working-directory: zephyr
shell: bash
run: |
if [ "${{ runner.os }}" = "macOS" ]; then
EXTRA_TWISTER_FLAGS="-P native_sim --build-only"
elif [ "${{ runner.os }}" = "Windows" ]; then
EXTRA_TWISTER_FLAGS="-P native_sim --short-build-path -O/tmp/twister-out"
fi
./scripts/twister --force-color --inline-logs -T samples/hello_world -v $EXTRA_TWISTER_FLAGS