Use vendor script to vendor lowrisc_ip #20
Workflow file for this run
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Muntjac | |
| uses: actions/checkout@v4 | |
| - name: Prepare environment | |
| uses: ./.github/actions/prepare-env | |
| - name: Run lint | |
| run: make lint | |
| simulator-build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - name: pipeline | |
| sim: muntjac_pipeline | |
| - name: core | |
| sim: muntjac_core | |
| steps: | |
| - name: Checkout Muntjac | |
| uses: actions/checkout@v4 | |
| - name: Prepare environment | |
| uses: ./.github/actions/prepare-env | |
| - name: Run build | |
| run: make sim-${{ matrix.name }} | |
| - name: Upload simulator | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.sim }} | |
| path: bin/${{ matrix.sim }} | |
| if-no-files-found: error | |
| riscv-tests-build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Muntjac | |
| uses: actions/checkout@v4 | |
| - name: Checkout riscv-tests | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: riscv/riscv-tests | |
| ref: c4217d88bce9f805a81f42e86ff56ed363931d69 | |
| submodules: recursive | |
| path: riscv-tests | |
| - name: Override with custom link.ld | |
| run: | | |
| cp flows/link.ld riscv-tests/env/p/link.ld | |
| - name: Download compiler toolchain | |
| uses: i3h/download-release-asset@v1 | |
| with: | |
| owner: lowRISC | |
| repo: lowrisc-toolchains | |
| tag: 20230427-1 | |
| file: lowrisc-toolchain-gcc-rv64imac-20230427-1.tar.xz | |
| # Also add the tools to PATH for next step. | |
| - name: Extract compiler toolchain | |
| run: | | |
| tar -xf lowrisc-toolchain-gcc-rv64imac-20230427-1.tar.xz | |
| echo "`pwd`/lowrisc-toolchain-gcc-rv64imac-20230427-1/bin" >> $GITHUB_PATH | |
| # All tests except breakpoint - it is not part of the core specification. | |
| - name: Build ISA tests | |
| run: | | |
| cd riscv-tests/isa | |
| make -j$(nproc) | |
| rm *.dump | |
| rm rv64mi-p-breakpoint | |
| tar -cjf ~/riscv-isa-tests.tar.xz * | |
| - name: Upload test binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: riscv-isa-tests | |
| path: ~/riscv-isa-tests.tar.xz | |
| if-no-files-found: error | |
| riscv-tests-run: | |
| runs-on: ubuntu-22.04 | |
| needs: [simulator-build, riscv-tests-build] | |
| strategy: | |
| matrix: | |
| include: | |
| - name: pipeline | |
| sim: muntjac_pipeline | |
| - name: core | |
| sim: muntjac_core | |
| steps: | |
| - name: Checkout Muntjac | |
| uses: actions/checkout@v4 | |
| - name: Get simulator | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.sim }} | |
| - name: Get tests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: riscv-isa-tests | |
| - name: Unpack tests | |
| run: | | |
| mkdir tests | |
| tar -xf riscv-isa-tests.tar.xz -C tests | |
| # Create a summary of each test outcome in the JUnit XML format. | |
| - name: Run tests | |
| run: | | |
| chmod +x ${{ matrix.sim }} | |
| make -f test/riscv-tests/Makefile results.xml -j$(nproc) TEST_DIR=tests MUNTJAC_SIM=./${{ matrix.sim }} | |
| - name: Upload test report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: riscv-tests-${{ matrix.name }} | |
| path: results.xml | |
| if-no-files-found: error | |
| - name: Publish job summary | |
| uses: mikepenz/action-junit-report@ec3a351c13e080dc4fa94c49ab7ad5bf778a9668 # v5 | |
| with: | |
| report_paths: results.xml | |
| annotate_only: true | |
| detailed_summary: true |