mox-run: drop redundant default args (--mode interpret, --resource-gu… #91
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: e2e-waveform | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: e2e-waveform-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| waveform-e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| - name: Cache Playwright browser | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-chromium-1.58.2 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Prepare Surfer assets | |
| run: scripts/setup-surfer.sh | |
| - name: Ensure MOX wasm artifacts | |
| id: mox_artifacts | |
| run: | | |
| mkdir -p static/mox | |
| have_all_artifacts() { | |
| [ -f static/mox/mox-verilog.js ] && \ | |
| [ -f static/mox/mox-verilog.wasm ] && \ | |
| [ -f static/mox/mox-sim.js ] && \ | |
| [ -f static/mox/mox-sim.wasm ] | |
| } | |
| if have_all_artifacts; then | |
| echo "ready=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| echo "Local MOX wasm artifacts missing; trying release 'mox-wasm'..." | |
| if gh release download mox-wasm \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| -D static/mox \ | |
| --clobber 2>/dev/null; then | |
| if have_all_artifacts; then | |
| echo "ready=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| fi | |
| echo "ready=false" >> "$GITHUB_OUTPUT" | |
| echo "::notice::Skipping waveform E2E: MOX wasm artifacts are missing (expected under static/mox or release mox-wasm)." | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build app | |
| if: steps.mox_artifacts.outputs.ready == 'true' | |
| run: npm run build | |
| - name: Run unit tests | |
| if: steps.mox_artifacts.outputs.ready == 'true' | |
| run: npm test | |
| - name: Install Playwright browser | |
| if: steps.mox_artifacts.outputs.ready == 'true' | |
| run: npx playwright install --with-deps chromium | |
| - name: Run waveform E2E | |
| if: steps.mox_artifacts.outputs.ready == 'true' | |
| run: npm run test:e2e -- e2e/waveform.spec.js | |
| - name: Upload Playwright artifacts | |
| if: always() && steps.mox_artifacts.outputs.ready == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-waveform-${{ github.run_id }} | |
| path: | | |
| playwright-report | |
| test-results | |
| if-no-files-found: ignore |