[ci] Remove WASM build from CI — download pre-built artifacts from re… #65
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 CIRCT wasm artifacts | |
| id: circt_artifacts | |
| run: | | |
| mkdir -p static/circt | |
| have_all_artifacts() { | |
| [ -f static/circt/circt-verilog.js ] && \ | |
| [ -f static/circt/circt-verilog.wasm ] && \ | |
| [ -f static/circt/circt-sim.js ] && \ | |
| [ -f static/circt/circt-sim.wasm ] | |
| } | |
| if have_all_artifacts; then | |
| echo "ready=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| echo "Local CIRCT wasm artifacts missing; trying release 'circt-wasm'..." | |
| if gh release download circt-wasm \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| -D static/circt \ | |
| --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: CIRCT wasm artifacts are missing (expected under static/circt or release circt-wasm)." | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build app | |
| if: steps.circt_artifacts.outputs.ready == 'true' | |
| run: npm run build | |
| - name: Run unit tests | |
| if: steps.circt_artifacts.outputs.ready == 'true' | |
| run: npm test | |
| - name: Install Playwright browser | |
| if: steps.circt_artifacts.outputs.ready == 'true' | |
| run: npx playwright install --with-deps chromium | |
| - name: Run waveform E2E | |
| if: steps.circt_artifacts.outputs.ready == 'true' | |
| run: npm run test:e2e -- e2e/waveform.spec.js | |
| - name: Upload Playwright artifacts | |
| if: always() && steps.circt_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 |