From 3636e9ab20bed8e1a7e4e1f23d91b97b5d6c289c Mon Sep 17 00:00:00 2001 From: Usman Aziz Date: Tue, 12 Nov 2024 15:37:11 +0000 Subject: [PATCH] Separate runners for each test. --- .github/workflows/on-pr.yml | 12 +++++++++++- .github/workflows/run-tests.yml | 9 +-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index 6109ab95..7d60214c 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -16,7 +16,17 @@ jobs: needs: [pre-commit, spdx] uses: ./.github/workflows/run-build.yml secrets: inherit + collect_dirs: + runs-on: ubuntu-latest + outputs: + dirs: ${{ steps.dirs.outputs.dirs }} + steps: + - uses: actions/checkout@v2 + - id: dirs + run: echo "dirs=$(ls -d tests/models/*/ | jq --raw-input --slurp --compact-output 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT} test: - needs: build + needs: [build, collect_dirs] + strategy: + matrix: { dir: ${{ fromJson(needs.collect_dirs.outputs.dirs) }} } uses: ./.github/workflows/run-tests.yml secrets: inherit diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b6789ce3..89c68246 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -75,11 +75,4 @@ jobs: run: | source env/activate export LD_LIBRARY_PATH="/opt/ttmlir-toolchain/lib/:${{ steps.strings.outputs.install-output-dir }}/lib:${{ steps.strings.outputs.build-output-dir }}/lib:./lib/:${LD_LIBRARY_PATH}" - pytest -v tests/torch - - - name: Run ONNX tests - shell: bash - run: | - source env/activate - export LD_LIBRARY_PATH="/opt/ttmlir-toolchain/lib/:${{ steps.strings.outputs.install-output-dir }}/lib:${{ steps.strings.outputs.build-output-dir }}/lib:./lib/:${LD_LIBRARY_PATH}" - pytest -v tests/onnx + pytest -v ${{ matrix.dir }}