EoSim Sanity #2
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: EoSim Sanity | |
| on: | |
| schedule: | |
| - cron: '0 4 * * *' | |
| workflow_dispatch: | |
| env: | |
| EOSIM_VERSION: "0.1.0" | |
| jobs: | |
| install-validate: | |
| name: Install & Validate (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - 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: Verify installation | |
| run: | | |
| eosim --version | |
| eosim list | |
| - name: Validate all platform configs | |
| run: eosim list && eosim doctor | |
| nested-simulation: | |
| name: Nested Simulation (${{ matrix.platform }}) | |
| needs: install-validate | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - x86_64-linux | |
| - arm64-linux | |
| - riscv64-linux | |
| - stm32f4 | |
| - raspi4 | |
| - esp32 | |
| - nrf52 | |
| 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: Simulate ${{ matrix.platform }} | |
| run: | | |
| eosim simulate --platform ${{ matrix.platform }} --duration 10 --headless | |
| echo "${{ matrix.platform }}: PASSED" | |
| nested-guest-install: | |
| name: Guest OS Install (${{ matrix.guest }}) | |
| needs: install-validate | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - guest: Linux x86_64 | |
| platform: x86_64 | |
| - guest: Linux aarch64 | |
| platform: arm64 | |
| - guest: Linux riscv64 | |
| platform: riscv64 | |
| 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: Boot guest and test EoSim inside | |
| run: | | |
| echo "=== Nested Guest: ${{ matrix.guest }} ===" | |
| eosim simulate --platform ${{ matrix.platform }} --duration 15 --headless --nested-install | |
| echo "${{ matrix.guest }}: PASSED" | |
| windows-sanity: | |
| name: Windows Sanity | |
| needs: install-validate | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Test EoSim on Windows | |
| run: | | |
| pip install "eosim @ https://github.com/embeddedos-org/EoSim/releases/download/v${{ env.EOSIM_VERSION }}/eosim-${{ env.EOSIM_VERSION }}-py3-none-any.whl" | |
| eosim --version | |
| eosim list && eosim doctor | |
| eosim list-platforms | |
| macos-sanity: | |
| name: macOS Sanity | |
| needs: install-validate | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Test EoSim on macOS | |
| run: | | |
| pip install "eosim @ https://github.com/embeddedos-org/EoSim/releases/download/v${{ env.EOSIM_VERSION }}/eosim-${{ env.EOSIM_VERSION }}-py3-none-any.whl" | |
| eosim --version | |
| eosim list && eosim doctor | |
| eosim list-platforms | |
| sanity-gate: | |
| name: EoSim Sanity Gate | |
| if: always() | |
| needs: [install-validate, nested-simulation, nested-guest-install, windows-sanity, macos-sanity] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Results | |
| run: | | |
| echo "════════════════════════════════════════════════" | |
| echo " EoSim Sanity Results" | |
| echo "════════════════════════════════════════════════" | |
| echo "Install & Validate (3 OS × 3 Py): ${{ needs.install-validate.result }}" | |
| echo "Nested Simulation (7 platforms): ${{ needs.nested-simulation.result }}" | |
| echo "Nested Guest Install (3 guests): ${{ needs.nested-guest-install.result }}" | |
| echo "Windows Sanity: ${{ needs.windows-sanity.result }}" | |
| echo "macOS Sanity: ${{ needs.macos-sanity.result }}" | |
| echo "════════════════════════════════════════════════" | |
| if [ "${{ needs.install-validate.result }}" != "success" ]; then | |
| echo "❌ Install/validate failed"; exit 1 | |
| fi | |
| echo "✅ All EoSim sanity checks passed" |