Repository navigation
Logo, social card, SEO metadata and a detailed README #15
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: WASM Build | |
| on: | |
| push: | |
| paths: ['rtl/**', 'wasm/**', 'web/public/**', '.tools/**', '.github/workflows/wasm.yml'] | |
| pull_request: | |
| paths: ['rtl/**', 'wasm/**', 'web/public/**', '.tools/**', '.github/workflows/wasm.yml'] | |
| jobs: | |
| wasm-build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # The harness needs the same Verilator as the RTL suites (cocotb's >= 5.036 rule does not apply | |
| # here, but one version everywhere is simpler). Built from source and cached by version tag. | |
| - name: Cache Verilator build | |
| id: cache-verilator | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/verilator-install | |
| key: verilator-v5.036-ubuntu-24.04 | |
| - name: Build Verilator v5.036 from source | |
| if: steps.cache-verilator.outputs.cache-hit != 'true' | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y autoconf flex bison libfl2 libfl-dev help2man perl | |
| git clone --depth 1 --branch v5.036 https://github.com/verilator/verilator.git /tmp/verilator | |
| cd /tmp/verilator | |
| autoconf | |
| ./configure --prefix="$HOME/verilator-install" | |
| make -j$(nproc) | |
| make install | |
| - name: Add Verilator to PATH | |
| run: echo "$HOME/verilator-install/bin" >> $GITHUB_PATH | |
| - name: Set up Emscripten | |
| uses: mymindstorm/setup-emsdk@v14 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Build tiny_cpu WASM (both cores, one module) | |
| run: bash wasm/build.sh | |
| - name: Node test against the golden fixtures | |
| run: node wasm/test.mjs | |
| - name: Build spike WASM (toolchain check) | |
| run: bash wasm/spike/build.sh | |
| - name: Run spike headless | |
| run: node wasm/spike/test.mjs |