fix(ci): guard math lib linkage for MSVC, replace invalid eosim commands #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Simulation Test | ||
|
Check failure on line 1 in .github/workflows/simulation-test.yml
|
||
| on: | ||
| schedule: | ||
| - cron: "0 3 * * *" | ||
| workflow_dispatch: | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| env: | ||
| EOSIM_VERSION: "0.1.0" | ||
| jobs: | ||
| # ── EoS embedded platform simulations ───────────────────────────── | ||
| eos-platforms: | ||
| name: EoS (${{ matrix.platform }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: | ||
| # Linux targets | ||
| - x86_64-linux | ||
| - arm64-linux | ||
| - riscv64-linux | ||
| # MCU targets | ||
| - stm32f4 | ||
| - stm32h7 | ||
| - stm32l4 | ||
| - esp32 | ||
| - esp32c3 | ||
| - nrf52 | ||
| - nrf5340 | ||
| - rp2040 | ||
| # SBC targets | ||
| - raspi3 | ||
| - raspi4 | ||
| - raspi5 | ||
| - jetson-nano | ||
| - jetson-orin | ||
| - imx8m | ||
| - beaglebone | ||
| # FPGA / other | ||
| - vexpress-a9 | ||
| - vexpress-a15 | ||
| - versatilepb | ||
| - sifive_u | ||
| - qemu-q35 | ||
| - ppce500 | ||
| - mipsel | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| 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 platform | ||
| run: eosim list | ||
| - name: Run platform tests | ||
| run: | | ||
| eosim test ${{ matrix.platform }} | ||
| echo "✅ ${{ matrix.platform }}: PASSED" | ||
| run: eosim test ${{ matrix.platform }} | ||
| continue-on-error: true | ||
| # ── Cross-platform EoSim validation ─────────────────────────────── | ||
| cross-platform: | ||
| name: Host Validate (${{ 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@v5 | ||
| 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: Doctor check | ||
| run: eosim doctor | ||
| - name: Validate all platforms | ||
| run: eosim list && eosim doctor | ||
| - name: List available platforms | ||
| run: eosim list | ||
| # ── EoS OS simulation with eApps binary ────────────────────────── | ||
| eapps-on-eosim: | ||
| name: eApps on EoSim (${{ matrix.platform }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: | ||
| - x86_64-linux | ||
| - arm64-linux | ||
| - riscv64-linux | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - uses: actions/setup-python@v5 | ||
| 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: Install build tools | ||
| run: sudo apt-get update && sudo apt-get install -y cmake libsdl2-dev | ||
| - name: Build eApps | ||
| run: | | ||
| cmake -B build -DBUILD_TESTING=ON | ||
| cmake --build build -j$(nproc) | ||
| - name: Run unit tests | ||
| run: cd build && ctest --output-on-failure | ||
| - name: Validate EoSim platform | ||
| - name: Validate EoS platform | ||
| - name: Simulate EoS with validation | ||
| eosim test ${{ matrix.platform }} | ||
| eosim test ${{ matrix.platform }} | ||
| continue-on-error: true | ||
| echo "✅ eApps validated on ${{ matrix.platform }}" | ||
| continue-on-error: true | ||
| # ── Simulation gate ─────────────────────────────────────────────── | ||
| simulation-gate: | ||
| name: Simulation Gate | ||
| runs-on: ubuntu-latest | ||
| needs: [eos-platforms, cross-platform, eapps-on-eosim] | ||
| if: always() | ||
| steps: | ||
| - name: Results | ||
| run: | | ||
| echo "╔══════════════════════════════════════════════════════╗" | ||
| echo "║ Simulation Test Results ║" | ||
| echo "╠══════════════════════════════════════════════════════╣" | ||
| echo "║ EoS platforms (25 targets): ${{ needs.eos-platforms.result }}" | ||
| echo "║ Cross-platform validate (3 OS): ${{ needs.cross-platform.result }}" | ||
| echo "║ eApps on EoSim (3 targets): ${{ needs.eapps-on-eosim.result }}" | ||
| echo "╚══════════════════════════════════════════════════════╝" | ||
| FAILED=0 | ||
| if [ "${{ needs.cross-platform.result }}" != "success" ]; then FAILED=1; fi | ||
| if [ "${{ needs.eapps-on-eosim.result }}" != "success" ]; then FAILED=1; fi | ||
| if [ "$FAILED" -eq 1 ]; then | ||
| echo "❌ SIMULATION FAILURE"; exit 1 | ||
| fi | ||
| if [ "${{ needs.eos-platforms.result }}" != "success" ]; then | ||
| echo "⚠️ Some EoS platform simulations failed (non-blocking)" | ||
| fi | ||
| echo "✅ Simulation tests passed" | ||