-
Notifications
You must be signed in to change notification settings - Fork 152
80 lines (75 loc) · 2.36 KB
/
on-target.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
on:
push:
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:
# allows manual triggering
workflow_dispatch:
name: cortex-m on-target tests
jobs:
hil-qemu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7m-none-eabi
- name: Build testsuite
env:
RUSTFLAGS: -C link-arg=-Tlink.x -D warnings
run: cargo build -p testsuite --target thumbv7m-none-eabi
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install qemu qemu-system-arm
- name: Run testsuite
run: |
qemu-system-arm \
-cpu cortex-m3 \
-machine lm3s6965evb \
-nographic \
-semihosting-config enable=on,target=native \
-kernel target/thumbv7m-none-eabi/debug/testsuite
hil-compile-rtt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv6m-none-eabi
- name: Modify linkerfile
run: |
sed -i 's/FLASH : ORIGIN = 0x00000000, LENGTH = 256K/FLASH : ORIGIN = 0x8000000, LENGTH = 128K/g' memory.x
sed -i 's/RAM : ORIGIN = 0x20000000, LENGTH = 64K/RAM : ORIGIN = 0x20000000, LENGTH = 16K/g' memory.x
- name: Build testsuite
env:
RUSTFLAGS: -C link-arg=-Tlink.x -D warnings
run: cargo build -p testsuite --target thumbv6m-none-eabi --features rtt
- name: Upload testsuite binaries
uses: actions/upload-artifact@v4
with:
name: testsuite-bin
if-no-files-found: error
retention-days: 1
path: target/thumbv6m-none-eabi/debug/testsuite
hil-stm32:
runs-on: self-hosted
needs:
- hil-compile-rtt
steps:
- uses: actions/checkout@v4
- name: Display probe-rs version
run: probe-rs --version
- name: List probes
run: probe-rs list
- uses: actions/download-artifact@v4
with:
name: testsuite-bin
path: testsuite-bin
- name: Run on-target tests
timeout-minutes: 5
run: |
probe-rs run \
--chip STM32F070RBTx \
--connect-under-reset \
--probe 0483:374b:066CFF504955857567220634 \
testsuite-bin/testsuite