|
| 1 | +# Copyright 2024 The IREE Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License v2.0 with LLVM Exceptions. |
| 4 | +# See https://llvm.org/LICENSE.txt for license information. |
| 5 | +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | + |
| 7 | +name: PkgCI Test Sharktank |
| 8 | +on: |
| 9 | + workflow_call: |
| 10 | + inputs: |
| 11 | + artifact_run_id: |
| 12 | + type: string |
| 13 | + default: "" |
| 14 | + workflow_dispatch: |
| 15 | + inputs: |
| 16 | + artifact_run_id: |
| 17 | + type: string |
| 18 | + default: "" |
| 19 | + |
| 20 | +jobs: |
| 21 | + test_sharktank_models: |
| 22 | + name: "test_sharktank_models :: ${{ matrix.name }}" |
| 23 | + runs-on: ${{ matrix.runs-on }} |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + include: |
| 28 | + # CPU |
| 29 | + - name: cpu_llvm_task |
| 30 | + runs-on: ubuntu-20.04 |
| 31 | + |
| 32 | + env: |
| 33 | + VENV_DIR: ${{ github.workspace }}/venv |
| 34 | + steps: |
| 35 | + - name: Checking out IREE repository |
| 36 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 37 | + with: |
| 38 | + submodules: false |
| 39 | + - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0 |
| 40 | + with: |
| 41 | + # Must match the subset of versions built in pkgci_build_packages. |
| 42 | + python-version: "3.11" |
| 43 | + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 44 | + with: |
| 45 | + name: linux_x86_64_release_packages |
| 46 | + path: ${{ env.PACKAGE_DOWNLOAD_DIR }} |
| 47 | + - name: Setup venv |
| 48 | + run: | |
| 49 | + ./build_tools/pkgci/setup_venv.py ${VENV_DIR} \ |
| 50 | + --artifact-path=${PACKAGE_DOWNLOAD_DIR} \ |
| 51 | + --fetch-gh-workflow=${{ inputs.artifact_run_id }} |
| 52 | +
|
| 53 | + - name: Checkout test suites repository |
| 54 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
| 55 | + with: |
| 56 | + repository: iree-org/iree-test-suites |
| 57 | + ref: a0c84d59c4332463dd46a3c4877d8e0ab2e0a80d |
| 58 | + path: iree-test-suites |
| 59 | + lfs: true |
| 60 | + - name: Install Sharktank models test suite requirements |
| 61 | + run: | |
| 62 | + source ${VENV_DIR}/bin/activate |
| 63 | + python -m pip install -r iree-test-suites/sharktank_models/requirements.txt |
| 64 | + - name: Run Sharktank models test suite |
| 65 | + run: | |
| 66 | + source ${VENV_DIR}/bin/activate |
| 67 | + pytest iree-test-suites/sharktank_models/ \ |
| 68 | + -rA \ |
| 69 | + -m "target_cpu" \ |
| 70 | + --log-cli-level=info \ |
| 71 | + --override-ini=xfail_strict=false \ |
| 72 | + --timeout=120 \ |
| 73 | + --durations=0 |
0 commit comments