-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (86 loc) · 3.17 KB
/
qemu-test.yml
File metadata and controls
86 lines (86 loc) · 3.17 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
name: QEMU Simulation Test
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
env:
EOSIM_VERSION: "0.1.0"
jobs:
simulate:
name: EoSim ${{ matrix.platform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- x86_64-linux
- arm64-linux
- riscv64-linux
- stm32f4
- raspi4
- vexpress-a9
- sifive_u
- qemu-q35
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install EoSim from source
run: |
git clone --depth 1 --branch v${{ env.EOSIM_VERSION }} https://github.com/embeddedos-org/EoSim.git /tmp/EoSim
pip install -e /tmp/EoSim
- name: Validate platform
run: eosim list
- name: Simulate ${{ matrix.platform }}
run: |
echo "=== EoSim Simulation: ${{ matrix.platform }} ==="
eosim run ${{ matrix.platform }} --headless --timeout 15
echo "${{ matrix.platform }}: PASSED"
- name: Run platform tests
run: eosim test ${{ matrix.platform }}
- name: Collect artifacts
run: eosim artifact ${{ matrix.platform }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: qemu-sim-${{ matrix.platform }}
path: out/
retention-days: 7
cross-platform-verify:
name: Cross-Platform Verify (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install EoSim
run: pip install "eosim @ https://github.com/embeddedos-org/EoSim/releases/download/v${{ env.EOSIM_VERSION }}/eosim-${{ env.EOSIM_VERSION }}-py3-none-any.whl"
- name: Validate all platforms
run: eosim list && eosim doctor
sanity-gate:
name: QEMU Simulation Gate
if: always()
needs: [simulate, cross-platform-verify]
runs-on: ubuntu-latest
steps:
- name: Results
run: |
echo "════════════════════════════════════════════"
echo " QEMU Simulation Results (via EoSim)"
echo "════════════════════════════════════════════"
echo "Simulation (8 platforms): ${{ needs.simulate.result }}"
echo "Cross-Platform (Win/Lin/Mac): ${{ needs.cross-platform-verify.result }}"
echo "════════════════════════════════════════════"
if [ "${{ needs.simulate.result }}" != "success" ]; then
echo "❌ Simulation failed"; exit 1
fi
if [ "${{ needs.cross-platform-verify.result }}" != "success" ]; then
echo "❌ Cross-platform verification failed"; exit 1
fi
echo "✅ All QEMU simulation checks passed"