From 5aa5e7944d25ab69bd9bb5ee6fd29d12e4b6fe54 Mon Sep 17 00:00:00 2001 From: autoreview Date: Thu, 10 Sep 2026 00:13:32 -0700 Subject: [PATCH 1/2] fix: install EoSim from the pinned tag in the Windows and macOS sanity jobs Opened by the scheduled autoreview pipeline after review of open PRs. Reviewed against the EmbeddedOS Master Design v2.0. Files: .github/workflows/eosim-sanity.yml --- .github/workflows/eosim-sanity.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eosim-sanity.yml b/.github/workflows/eosim-sanity.yml index f6d0403a..d09e0450 100644 --- a/.github/workflows/eosim-sanity.yml +++ b/.github/workflows/eosim-sanity.yml @@ -111,9 +111,12 @@ jobs: - 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: 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 @@ -127,9 +130,12 @@ jobs: - 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: 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 From 4fcf523ae8315dde5f9d8f212e9b929efabd7c06 Mon Sep 17 00:00:00 2001 From: Srikanth Patchava Date: Thu, 1 Oct 2026 01:21:16 -0700 Subject: [PATCH 2/2] ci(eosim-sanity): check what EoSim returns, and run the getting-started path The workflow judged EoSim by exit status alone. "eosim list" exited 0 while it listed zero platforms (EoSim#34), and the nested-simulation and guest-install jobs ran "eosim run " with no firmware, which executes nothing, and then printed "PASSED". The workflow was green and had proven nothing. - EoSim is pinned to the EoSim#35 merge (c5e2770) and installed as embeddedos-eosim. No release tag contains the list fix yet. - install-validate parses "eosim list --format json", requires at least 100 platforms, and requires "ebuild platforms list" to return the same set. It runs on Linux, Windows and macOS with Python 3.10-3.12. - golden-path is new and runs the guide as written on ubuntu-latest: ebuild setup, ebuild init my-blink --template rtos --target stm32f4, then ebuild sim --expect 'id=3 value=40'. That last step boots the EoS kernel on QEMU and passes only on the app's real output. It also checks that "ebuild sim --platform esp32" fails. - The jobs that executed nothing are removed, and so are the windows/macos jobs that install-validate's matrix already covers. The ebuild platforms hint now names embeddedos-eosim. Refs #169 --- .github/workflows/eosim-sanity.yml | 161 +++++++++-------------------- ebuild/cli/golden_path.py | 3 +- 2 files changed, 51 insertions(+), 113 deletions(-) diff --git a/.github/workflows/eosim-sanity.yml b/.github/workflows/eosim-sanity.yml index 4ef7aa34..236fa407 100644 --- a/.github/workflows/eosim-sanity.yml +++ b/.github/workflows/eosim-sanity.yml @@ -1,22 +1,23 @@ name: EoSim Sanity on: - # A change to this file tests itself. Without this the workflow was - # schedule- and dispatch-only, so a pull request editing it produced no - # run of it at all. + # A change to this file, or to the commands it exercises, tests itself. pull_request: paths: - '.github/workflows/eosim-sanity.yml' + - 'ebuild/cli/golden_path.py' + - 'ebuild/templates/**' schedule: - cron: '0 4 * * *' workflow_dispatch: env: - # v0.1.0 has never existed. embeddedos-org/EoSim tags v1.0.0 through - # v3.0.1, so `git clone --branch v0.1.0` fails with "Remote branch - # v0.1.0 not found in upstream origin" and this workflow has never had a - # green run. v1.5.0 is the release marked Latest and installs from source. - EOSIM_VERSION: "1.5.0" + # A pinned EoSim commit, not a tag. Every tag through v3.0.1 has the + # filter bug in which "eosim list" printed "Available platforms (0)" and + # still exited 0 (EoSim#34). This workflow checked only exit codes, so it + # stayed green while listing nothing. c5e2770 is the merge of EoSim#35, + # which fixes that. Move this to a release tag once one contains it. + EOSIM_REF: "c5e27702b9ab8e3e9dcf34b7686a1c1c1040515c" permissions: contents: read @@ -39,132 +40,68 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install EoSim from source + - name: Install EoSim and this ebuild 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: Verify installation + python -m pip install "embeddedos-eosim @ git+https://github.com/embeddedos-org/EoSim@${{ env.EOSIM_REF }}" . + - name: The registry is not empty + # Exit status alone proved nothing here: "eosim list" exited 0 while + # listing zero platforms. Count what it returns. + shell: python run: | - eosim --version - eosim list - - name: Validate all platform configs - run: eosim list && eosim doctor + import json, subprocess + rows = json.loads(subprocess.check_output(["eosim", "list", "--format", "json"], text=True)) + names = subprocess.check_output(["ebuild", "platforms", "list", "--format", "names"], text=True).split() + print(f"eosim list: {len(rows)} platforms; ebuild platforms list: {len(names)}") + assert len(rows) >= 100, f"eosim list returned only {len(rows)} platforms" + assert sorted(names) == sorted(r["name"] for r in rows), "ebuild and eosim disagree" + - name: eosim doctor + run: eosim doctor - nested-simulation: - name: Nested Simulation (${{ matrix.platform }}) - needs: install-validate + # The getting-started guide's simulator path, run as written: setup, init, + # then sim. ebuild sim builds the rtos template with the EoS kernel for + # QEMU's Cortex-M3 machine and passes only if the expected output shows up. + golden-path: + name: Getting-started path (ebuild init + ebuild sim on QEMU) 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 from source + - name: Install toolchain and QEMU 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: Simulate ${{ matrix.platform }} + sudo apt-get update -qq + sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi qemu-system-arm + - name: Install ebuild and EoSim + run: python -m pip install "embeddedos-eosim @ git+https://github.com/embeddedos-org/EoSim@${{ env.EOSIM_REF }}" . + - name: ebuild setup + run: ebuild setup + - name: ebuild init + working-directory: ${{ runner.temp }} + run: ebuild init my-blink --template rtos --target stm32f4 + - name: ebuild sim boots the EoS kernel and the app runs + working-directory: ${{ runner.temp }}/my-blink + run: ebuild sim --expect 'id=3 value=40' --timeout 60 + - name: Unsupported boards are refused, not faked + working-directory: ${{ runner.temp }}/my-blink run: | - eosim run ${{ matrix.platform }} --headless --timeout 10 - 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-linux - - guest: Linux aarch64 - platform: arm64-linux - - guest: Linux riscv64 - platform: riscv64-linux - 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: Boot guest and test EoSim inside - run: | - echo "=== Nested Guest: ${{ matrix.guest }} ===" - eosim run ${{ matrix.platform }} --headless --timeout 15 - 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: 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: Test EoSim on Windows - run: | - eosim --version - eosim list && eosim doctor - eosim list - - 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: 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: Test EoSim on macOS - run: | - eosim --version - eosim list && eosim doctor - eosim list + if ebuild sim --platform esp32; then + echo "::error::ebuild sim --platform esp32 reported success; there is no ESP32 sim target" + exit 1 + fi sanity-gate: name: EoSim Sanity Gate if: always() - needs: [install-validate, nested-simulation, nested-guest-install, windows-sanity, macos-sanity] + needs: [install-validate, golden-path] runs-on: ubuntu-latest steps: - # Iterates toJSON(needs) rather than naming one dependency. The previous - # body tested install-validate alone and then printed "All EoSim sanity - # checks passed" -- which it did on 2026-09-17 (run 35181688794) with - # Windows Sanity and macOS Sanity both red. Five jobs in needs:, one - # checked. This form cannot fall out of step with needs:, and it is the - # gate eos and eBoot already run. + # Iterates toJSON(needs) so the gate cannot fall out of step with needs:. - name: Every job in this workflow must have succeeded env: RESULTS: ${{ toJSON(needs) }} run: | set -euo pipefail - # Refuse to conclude anything from nothing: an empty or null - # RESULTS is not "no failures". if [ -z "${RESULTS:-}" ] || [ "$RESULTS" = "null" ]; then echo "::error::gate received no results to check" exit 1 diff --git a/ebuild/cli/golden_path.py b/ebuild/cli/golden_path.py index 2385c897..e9be2761 100644 --- a/ebuild/cli/golden_path.py +++ b/ebuild/cli/golden_path.py @@ -323,7 +323,8 @@ def platforms_list(fmt: str) -> None: from eosim.cli.main import _load_registry except ImportError as exc: # pragma: no cover - exercised without eosim raise SimError("EoSim is not installed: pip install " - "'eosim @ git+https://github.com/embeddedos-org/EoSim'") from exc + "'embeddedos-eosim @ git+https://github.com/embeddedos-org/EoSim'" + ) from exc entries = sorted(_load_registry().all(), key=lambda p: p.name) if not entries: raise SimError("EoSim's platform registry is empty")