4
4
5
5
name : Run tests
6
6
7
- on : [pull_request, push]
7
+ on :
8
+ workflow_call :
9
+ inputs :
10
+ cp-version :
11
+ required : true
12
+ type : string
8
13
9
14
jobs :
10
15
run :
11
16
runs-on : ubuntu-22.04
17
+ env :
18
+ CP_VERSION : ${{ inputs.cp-version }}
12
19
steps :
13
20
- name : Set up repository
14
21
uses : actions/checkout@v3
18
25
- name : Set up circuitpython repository
19
26
uses : actions/checkout@v3
20
27
with :
28
+ ref : ${{ inputs.cp-version }}
21
29
repository : adafruit/circuitpython
22
30
path : ./circuitpython/
23
31
submodules : false
@@ -32,14 +40,26 @@ jobs:
32
40
run : python tools/ci_fetch_deps.py tests
33
41
shell : bash
34
42
working-directory : ./circuitpython/
43
+ - name : Fetch relevant submodules
44
+ id : submodules
45
+ run : tools/fetch-submodules.sh frozen/Adafruit_CircuitPython_Ticks ports/unix
46
+ working-directory : ./circuitpython
35
47
- name : Install python dependencies
36
48
run : pip install -r requirements-dev.txt
37
49
shell : bash
38
50
working-directory : ./circuitpython/
51
+ - name : Build mpy-cross
52
+ run : make -C mpy-cross -j2
53
+ working-directory : ./circuitpython/
39
54
- name : Build unix port
40
- run : make -C ports/unix VARIANT=coverage -j2
55
+ run : make -C ports/unix VARIANT=coverage BUILD=build-coverage PROG=micropython -j2
41
56
working-directory : ./circuitpython/
57
+ - name : Move micropython binary to the expected location
58
+ if : ${{ startsWith(inputs.cp-version, '8.2.') }}
59
+ run : mv ../circuitpython/ports/unix/micropython* ../circuitpython/ports/unix/build-coverage/
60
+ working-directory : tests
42
61
- name : Run tests
62
+ if : ${{ startsWith(inputs.cp-version, '8.2.') }}
43
63
run : ./run_tests.py
44
64
working-directory : tests
45
65
env :
0 commit comments