Bump riscv-arch-test from db2b9fd to 2e65596
#234
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: | |
| workflow_dispatch: | |
| # Make this workflow reusable | |
| workflow_call: | |
| outputs: | |
| riscv_tests_hash: | |
| description: "riscv-tests commit hash" | |
| value: ${{ jobs.build-riscv-tests.outputs.riscv_tests_hash }} | |
| riscv_vector_tests_hash: | |
| description: "riscv-vector-tests commit hash" | |
| value: ${{ jobs.build-riscv-tests.outputs.riscv_vector_tests_hash }} | |
| riscv_arch_tests_hash: | |
| description: "riscv-arch-tests commit hash" | |
| value: ${{ jobs.build-riscv-tests.outputs.riscv_arch_tests_hash }} | |
| damo_hash: | |
| description: "damo-rv-priv-ats commit hash" | |
| value: ${{ jobs.build-damo-tests.outputs.damo_hash }} | |
| toolchain_release: | |
| description: "RISC-V Toolchain Release" | |
| value: ${{ jobs.build-riscv-tests.outputs.toolchain_release }} | |
| spike_hash: | |
| description: "Spike commit hash" | |
| value: ${{ jobs.build-riscv-tests.outputs.spike_hash }} | |
| sail_riscv_release: | |
| description: "Sail RISC-V release" | |
| value: ${{ jobs.build-riscv-tests.outputs.sail_riscv_release }} | |
| jobs: | |
| build-riscv-tests: | |
| name: "Build riscv-tests" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| riscv_tests_hash: ${{ steps.log-versions.outputs.riscv_tests_hash }} | |
| riscv_vector_tests_hash: ${{ steps.log-versions.outputs.riscv_vector_tests_hash }} | |
| riscv_arch_tests_hash: ${{ steps.log-versions.outputs.riscv_arch_tests_hash }} | |
| spike_hash: ${{ steps.log-versions.outputs.spike_hash }} | |
| toolchain_release: ${{ steps.log-versions.outputs.toolchain_release }} | |
| sail_riscv_release: ${{ steps.log-versions.outputs.sail_riscv_release }} | |
| steps: | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Checkout repo with submodules | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup version environment | |
| run: | | |
| SPIKE_HASH=$(just show-spike-hash) | |
| echo "SPIKE_HASH=$SPIKE_HASH" >> $GITHUB_ENV | |
| TOOLCHAIN_RELEASE=$(just show-toolchain-release) | |
| echo "TOOLCHAIN_RELEASE=$TOOLCHAIN_RELEASE" >> $GITHUB_ENV | |
| - name: Restore cached toolchain | |
| id: restore-cached-toolchain | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ github.workspace }}/riscv | |
| key: ${{ runner.os }}-toolchain-${{ env.TOOLCHAIN_RELEASE }} | |
| - name: Install toolchain | |
| if: steps.restore-cached-toolchain.outputs.cache-hit != 'true' | |
| run: | | |
| just install-toolchain ${{ github.workspace }} | |
| - name: Cache toolchain | |
| id: cache-toolchain | |
| # Update cache only on the main branch | |
| if: steps.restore-cached-toolchain.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ github.workspace }}/riscv | |
| key: ${{ steps.restore-cached-toolchain.outputs.cache-primary-key }} | |
| - name: Setup environment | |
| run: | | |
| echo "PATH=${{ github.workspace }}/riscv/bin:$PATH" >> $GITHUB_ENV | |
| echo "RISCV=${{ github.workspace }}/riscv" >> $GITHUB_ENV | |
| - name: Build riscv-tests | |
| run: | | |
| just riscv-tests-tgz ${{ github.workspace }} | |
| - name: Log versions | |
| id: log-versions | |
| run: | | |
| RISCV_TESTS_HASH=$(git -C riscv-tests rev-parse HEAD) | |
| echo "riscv_tests_hash=$RISCV_TESTS_HASH" >> "$GITHUB_OUTPUT" | |
| RISCV_VECTOR_TESTS_HASH=$(git -C riscv-vector-tests rev-parse HEAD) | |
| echo "riscv_vector_tests_hash=$RISCV_VECTOR_TESTS_HASH" >> "$GITHUB_OUTPUT" | |
| RISCV_ARCH_TESTS_HASH=$(git -C riscv-arch-test rev-parse HEAD) | |
| echo "riscv_arch_tests_hash=$RISCV_ARCH_TESTS_HASH" >> "$GITHUB_OUTPUT" | |
| echo "spike_hash=${{ env.SPIKE_HASH }}" >> "$GITHUB_OUTPUT" | |
| echo "toolchain_release=${{ env.TOOLCHAIN_RELEASE }}" >> "$GITHUB_OUTPUT" | |
| SAIL_RISCV_RELEASE=$(just show-sail-riscv-release) | |
| echo "sail_riscv_release=$SAIL_RISCV_RELEASE" >> $GITHUB_OUTPUT | |
| - name: Upload riscv-tests tar.gz | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: riscv-tests.tar.gz | |
| path: riscv-tests.tar.gz | |
| if-no-files-found: error | |
| - name: Finish riscv-tests | |
| run: | | |
| echo "riscv-tests tar.gz built successfully!" | |
| build-vector-tests: | |
| name: "Build riscv-vector-tests" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| VLEN: [64, 128, 256] | |
| # For now, ELEN can't be freely choosen and needs to match XLEN | |
| XLEN: [32, 64] | |
| # Omit the 512/32 combination because it takes around 6 hours to build | |
| # often exceeding the Github CI limit of 6 hours. | |
| include: | |
| - VLEN: 512 | |
| XLEN: 64 | |
| steps: | |
| - name: Free Disk Space | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y device-tree-compiler | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Checkout repo with submodules | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup version environment | |
| run: | | |
| SPIKE_HASH=$(just show-spike-hash) | |
| echo "SPIKE_HASH=$SPIKE_HASH" >> $GITHUB_ENV | |
| TOOLCHAIN_RELEASE=$(just show-toolchain-release) | |
| echo "TOOLCHAIN_RELEASE=$TOOLCHAIN_RELEASE" >> $GITHUB_ENV | |
| - name: Restore cached vector test build tools | |
| id: restore-cached-vector-buildtools | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ github.workspace }}/riscv | |
| key: ${{ runner.os }}-vector-toolchain-${{ env.TOOLCHAIN_RELEASE }}-spike-${{ env.SPIKE_HASH }} | |
| - name: Install toolchain | |
| if: steps.restore-cached-vector-buildtools.outputs.cache-hit != 'true' | |
| run: | | |
| just install-toolchain ${{ github.workspace }} | |
| - name: Setup environment | |
| run: | | |
| echo "PATH=${{ github.workspace }}/riscv/bin:$PATH" >> $GITHUB_ENV | |
| echo "RISCV=${{ github.workspace }}/riscv" >> $GITHUB_ENV | |
| - name: Install Spike | |
| if: steps.restore-cached-vector-buildtools.outputs.cache-hit != 'true' | |
| run: | | |
| just build-spike ${{ github.workspace }} | |
| just clean-spike | |
| - name: Cache vector test build tools | |
| id: cache-vector-buildtools | |
| # Update cache only on the main branch | |
| if: steps.restore-cached-vector-buildtools.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ github.workspace }}/riscv | |
| key: ${{ steps.restore-cached-vector-buildtools.outputs.cache-primary-key }} | |
| - name: Build riscv-vector-tests | |
| run: | | |
| just vector-tests-tgz ${{ matrix.VLEN }} ${{ matrix.XLEN }} ${{ github.workspace }} | |
| - name: Upload riscv-vector-tests tar.gz | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: "riscv-vector-tests-v${{ matrix.VLEN }}x${{ matrix.XLEN }}.tar.gz" | |
| path: "riscv-vector-tests-v${{ matrix.VLEN }}x${{ matrix.XLEN }}.tar.gz" | |
| if-no-files-found: error | |
| - name: "Finish riscv-vector VLEN=${{ matrix.VLEN }} XLEN=${{ matrix.XLEN }}" | |
| run: | | |
| echo "riscv-vector-tests tar.gz built successfully!" | |
| build-arch-tests: | |
| name: "Build arch-tests" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Install mise | |
| uses: jdx/mise-action@v4 | |
| - name: Checkout repo with submodules | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup version environment | |
| run: | | |
| TOOLCHAIN_RELEASE=$(just show-toolchain-release) | |
| echo "TOOLCHAIN_RELEASE=$TOOLCHAIN_RELEASE" >> $GITHUB_ENV | |
| SAIL_RISCV_RELEASE=$(just show-sail-riscv-release) | |
| echo "SAIL_RISCV_RELEASE=$SAIL_RISCV_RELEASE" >> $GITHUB_ENV | |
| - name: Restore cached toolchain and sail-riscv | |
| id: restore-cached-toolchain-sail-riscv | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/riscv | |
| ${{ github.workspace }}/sail-riscv | |
| key: ${{ runner.os }}-toolchain-${{ env.TOOLCHAIN_RELEASE }}-sail-riscv-${{ env.SAIL_RISCV_RELEASE }} | |
| - name: Install toolchain | |
| if: steps.restore-cached-toolchain-sail-riscv.outputs.cache-hit != 'true' | |
| run: | | |
| just install-toolchain ${{ github.workspace }} | |
| - name: Install Sail RISC-V | |
| if: steps.restore-cached-toolchain-sail-riscv.outputs.cache-hit != 'true' | |
| run: | | |
| just install-sail-riscv ${{ github.workspace }} | |
| - name: Cache toolchain and sail-riscv | |
| id: cache-toolchain-sail-riscv | |
| # Update cache only on the main branch | |
| if: steps.restore-cached-toolchain-sail-riscv.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/riscv | |
| ${{ github.workspace }}/sail-riscv | |
| key: ${{ steps.restore-cached-toolchain-sail-riscv.outputs.cache-primary-key }} | |
| - name: Setup environment | |
| run: | | |
| echo "PATH=${{ github.workspace }}/riscv/bin:${{ github.workspace }}/sail-riscv/bin:$PATH" >> $GITHUB_ENV | |
| - name: Build arch-tests | |
| run: | | |
| just arch-tests-tgz ${{ github.workspace }} | |
| - name: Upload arch-tests tar.gz | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: riscv-arch-tests.tar.gz | |
| path: riscv-arch-tests.tar.gz | |
| if-no-files-found: error | |
| - name: Finish arch-tests | |
| run: | | |
| echo "riscv-arch-tests tar.gz built successfully!" | |
| build-damo-tests: | |
| name: "Build damo-rv-priv-ats tests" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| damo_hash: ${{ steps.log-versions.outputs.damo_hash }} | |
| steps: | |
| - name: Install just | |
| uses: extractions/setup-just@v3 | |
| - name: Checkout repo with submodules | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup version environment | |
| run: | | |
| TOOLCHAIN_RELEASE=$(just show-toolchain-release) | |
| echo "TOOLCHAIN_RELEASE=$TOOLCHAIN_RELEASE" >> $GITHUB_ENV | |
| - name: Restore cached toolchain | |
| id: restore-cached-toolchain | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ github.workspace }}/riscv | |
| key: ${{ runner.os }}-toolchain-${{ env.TOOLCHAIN_RELEASE }} | |
| - name: Install toolchain | |
| if: steps.restore-cached-toolchain.outputs.cache-hit != 'true' | |
| run: | | |
| just install-toolchain ${{ github.workspace }} | |
| - name: Setup environment | |
| run: | | |
| echo "PATH=${{ github.workspace }}/riscv/bin:$PATH" >> $GITHUB_ENV | |
| echo "RISCV=${{ github.workspace }}/riscv" >> $GITHUB_ENV | |
| - name: Build damo tests | |
| run: | | |
| just damo-tests-tgz | |
| - name: Log versions | |
| id: log-versions | |
| run: | | |
| DAMO_HASH=$(git -C damo-rv-priv-ats rev-parse HEAD) | |
| echo "damo_hash=$DAMO_HASH" >> "$GITHUB_OUTPUT" | |
| - name: Upload damo-tests tar.gz | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: damo-tests.tar.gz | |
| path: damo-tests.tar.gz | |
| if-no-files-found: error | |
| - name: Finish damo tests | |
| run: | | |
| echo "damo-tests tar.gz built successfully!" |