Run test and perf on native hardware on CI #4
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: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04-riscv | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - test-quantize | |
| - test-float | |
| - test-repack | |
| - test-backend-ops-mul-mat | |
| - test-backend-ops-flash-attn | |
| - perf-float | |
| - perf-repack | |
| - test-quantize-perf | |
| - perf-backend-ops-mul-mat | |
| - perf-backend-ops-flash-attn | |
| name: ${{ matrix.target }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| gcc-14 g++-14 ninja-build ccache cmake zlib1g-dev libgomp1 | |
| - name: Restore ccache | |
| uses: ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/1 | |
| with: | |
| key: ${{ matrix.target }} | |
| evict-old-files: 1d | |
| save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| - name: Configure | |
| run: cmake --preset riscv-release | |
| - name: Build | |
| run: cmake --build --preset riscv-release | |
| - name: Run ${{ matrix.target }} | |
| run: ctest --preset riscv-native-tests -R '^${{ matrix.target }}$' -V --output-on-failure |