|
5 | 5 | env:
|
6 | 6 | TARGETS: f7
|
7 | 7 | DEFAULT_TARGET: f7
|
8 |
| - FBT_TOOLCHAIN_PATH: /opt |
| 8 | + FBT_TOOLCHAIN_PATH: /opt/ |
9 | 9 | FBT_GIT_SUBMODULE_SHALLOW: 1
|
10 | 10 |
|
11 | 11 | jobs:
|
12 | 12 | run_units_on_bench:
|
13 |
| - runs-on: [self-hosted, FlipperZeroUnitTest] |
| 13 | + runs-on: [ self-hosted, FlipperZeroTest ] |
14 | 14 | steps:
|
15 |
| - - name: 'Wipe workspace' |
16 |
| - run: find ./ -mount -maxdepth 1 -exec rm -rf {} \; |
17 |
| - |
18 | 15 | - name: Checkout code
|
19 | 16 | uses: actions/checkout@v4
|
20 | 17 | with:
|
21 | 18 | fetch-depth: 1
|
22 | 19 | ref: ${{ github.event.pull_request.head.sha }}
|
23 | 20 |
|
24 |
| - - name: 'Get flipper from device manager (mock)' |
25 |
| - id: device |
26 |
| - run: | |
27 |
| - echo "flipper=auto" >> $GITHUB_OUTPUT |
28 |
| -
|
29 | 21 | - name: 'Flash unit tests firmware'
|
30 | 22 | id: flashing
|
31 | 23 | if: success()
|
32 |
| - timeout-minutes: 10 |
33 |
| - run: | |
34 |
| - ./fbt resources firmware_latest flash SWD_TRANSPORT_SERIAL=2A0906016415303030303032 LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1 |
35 |
| -
|
36 |
| - - name: 'Wait for flipper and format ext' |
37 |
| - id: format_ext |
38 |
| - if: steps.flashing.outcome == 'success' |
39 |
| - timeout-minutes: 5 |
| 24 | + timeout-minutes: 20 |
40 | 25 | run: |
|
41 | 26 | source scripts/toolchain/fbtenv.sh
|
42 |
| - python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=120 await_flipper |
43 |
| - python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} format_ext |
| 27 | + ./fbt resources firmware_latest flash LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1 |
| 28 | +
|
44 | 29 |
|
45 | 30 | - name: 'Copy assets and unit data, reboot and wait for flipper'
|
46 | 31 | id: copy
|
47 |
| - if: steps.format_ext.outcome == 'success' |
| 32 | + if: steps.flashing.outcome == 'success' |
48 | 33 | timeout-minutes: 7
|
49 | 34 | run: |
|
50 | 35 | source scripts/toolchain/fbtenv.sh
|
51 |
| - python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=15 await_flipper |
52 |
| - rm -rf build/latest/resources/dolphin |
53 |
| - python3 scripts/storage.py -p ${{steps.device.outputs.flipper}} -f send build/latest/resources /ext |
54 |
| - python3 scripts/power.py -p ${{steps.device.outputs.flipper}} reboot |
55 |
| - python3 scripts/testops.py -p=${{steps.device.outputs.flipper}} -t=15 await_flipper |
| 36 | + python3 scripts/testops.py -t=15 await_flipper |
| 37 | + python3 scripts/storage.py -f send build/latest/resources /ext |
| 38 | + python3 scripts/storage.py -f send /region_data /ext/.int/.region_data |
| 39 | + python3 scripts/power.py reboot |
| 40 | + python3 scripts/testops.py -t=30 await_flipper |
56 | 41 |
|
57 | 42 | - name: 'Run units and validate results'
|
58 | 43 | id: run_units
|
59 | 44 | if: steps.copy.outcome == 'success'
|
60 | 45 | timeout-minutes: 7
|
61 | 46 | run: |
|
62 | 47 | source scripts/toolchain/fbtenv.sh
|
63 |
| - python3 scripts/testops.py run_units -p ${{steps.device.outputs.flipper}} |
| 48 | + python3 scripts/testops.py run_units |
| 49 | +
|
| 50 | + - name: 'Upload test results' |
| 51 | + if: failure() && steps.flashing.outcome == 'success' && steps.run_units.outcome != 'skipped' |
| 52 | + uses: actions/upload-artifact@v4 |
| 53 | + with: |
| 54 | + name: unit-tests_output |
| 55 | + path: unit_tests*.txt |
64 | 56 |
|
65 | 57 | - name: 'Check GDB output'
|
66 | 58 | if: failure() && steps.flashing.outcome == 'success'
|
67 | 59 | run: |
|
68 |
| - ./fbt gdb_trace_all SWD_TRANSPORT_SERIAL=2A0906016415303030303032 LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1 |
| 60 | + ./fbt gdb_trace_all LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1 |
0 commit comments