forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (101 loc) · 3.12 KB
/
run-tests.yml
File metadata and controls
104 lines (101 loc) · 3.12 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Run tests
on:
workflow_call:
inputs:
cp-version:
required: true
type: string
jobs:
run:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
test: [all, mpy, native, native_mpy]
env:
CP_VERSION: ${{ inputs.cp-version }}
MICROPY_CPYTHON3: python3.12
MICROPY_MICROPYTHON: ../ports/unix/build-coverage/micropython
TEST_all:
TEST_mpy: --via-mpy -d basics float micropython
TEST_native: --emit native
TEST_native_mpy: --via-mpy --emit native -d basics float micropython
steps:
- name: Set up repository
uses: actions/checkout@v4
with:
submodules: false
show-progress: false
fetch-depth: 1
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Set up submodules
uses: ./.github/actions/deps/submodules
with:
target: tests
- name: Set up external
if: matrix.test == 'all'
uses: ./.github/actions/deps/external
- name: Set up mpy-cross
uses: ./.github/actions/mpy_cross
with:
cp-version: ${{ inputs.cp-version }}
- name: Build unix port
run: make -C ports/unix VARIANT=coverage -j4
- name: Run tests
run: ./run-tests.py -j4 ${{ env[format('TEST_{0}', matrix.test)] }}
working-directory: tests
- name: Print failure info
run: ./run-tests.py -j4 --print-failures
if: failure()
working-directory: tests
# Not working after MicroPython v1.23 merge.
# - name: Build native modules
# if: matrix.test == 'all'
# run: |
# make -C examples/natmod/features1
# make -C examples/natmod/features2
# make -C examples/natmod/heapq
# make -C examples/natmod/random
# make -C examples/natmod/re
# - name: Test native modules
# if: matrix.test == 'all'
# run: ./run-natmodtests.py extmod/{heapq*,random*,re*}.py
# working-directory: tests
zephyr:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
env:
CP_VERSION: ${{ inputs.cp-version }}
steps:
- name: Set up repository
uses: actions/checkout@v4
with:
submodules: false
show-progress: false
fetch-depth: 1
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Set up Zephyr
uses: ./.github/actions/deps/ports/zephyr-cp
- name: Set up submodules
id: set-up-submodules
uses: ./.github/actions/deps/submodules
with:
target: zephyr-cp
- name: Set up external
uses: ./.github/actions/deps/external
- name: Build native sim target
run: make -C ports/zephyr-cp -j2 BOARD=native_native_sim
- name: Build bsim
run: make -j 2 everything
working-directory: ports/zephyr-cp/tools/bsim
- name: Build native_nrf5340bsim
run: make -C ports/zephyr-cp -j2 BOARD=native_nrf5340bsim
- name: Run Zephyr tests
run: make -C ports/zephyr-cp test