Simulation Test #110
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 | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| EOSIM_VERSION: "0.1.0" | |
| permissions: | |
| contents: read | |
| jobs: | |
| simulate: | |
| name: Simulate (${{ matrix.platform }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - x86_64-linux | |
| - arm64-linux | |
| - riscv64-linux | |
| - stm32f4 | |
| - raspi4 | |
| - esp32 | |
| - nrf52 | |
| - vexpress-a9 | |
| - sifive_u | |
| - imx8m | |
| - jetson-nano | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| 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: Run simulation | |
| run: | | |
| echo "=== EoSim: ${{ matrix.platform }} ===" | |
| eosim run ${{ matrix.platform }} --headless --timeout 15 | |
| - name: Run platform tests | |
| run: eosim test ${{ matrix.platform }} | |
| continue-on-error: true | |
| - name: Collect artifacts | |
| run: | | |
| mkdir -p out | |
| eosim info ${{ matrix.platform }} > out/${{ matrix.platform }}-info.txt 2>&1 || true | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: sim-${{ matrix.platform }} | |
| path: out/ | |
| retention-days: 7 | |
| cross-platform: | |
| name: Cross-Platform (${{ 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: Validate all platforms | |
| run: | | |
| eosim list | |
| eosim doctor | |
| sanity-gate: | |
| name: Simulation Gate | |
| runs-on: ubuntu-latest | |
| needs: [simulate, cross-platform] | |
| if: always() | |
| steps: | |
| - name: Results | |
| run: | | |
| echo "════════════════════════════════════════════" | |
| echo " EoSim Simulation Results — EIPC" | |
| echo "════════════════════════════════════════════" | |
| echo "Simulation (11 platforms): ${{ needs.simulate.result }}" | |
| echo "Cross-Platform (Win/Lin/Mac): ${{ needs.cross-platform.result }}" | |
| echo "════════════════════════════════════════════" | |
| if [ "${{ needs.simulate.result }}" != "success" ]; then | |
| echo "❌ Simulation failed"; exit 1 | |
| fi | |
| if [ "${{ needs.cross-platform.result }}" != "success" ]; then | |
| echo "❌ Cross-platform validation failed"; exit 1 | |
| fi | |
| echo "✅ All simulation checks passed" |