Skip to content

Commit

Permalink
Separate runners for each test.
Browse files Browse the repository at this point in the history
  • Loading branch information
uazizTT committed Nov 12, 2024
1 parent f71ec73 commit 902b20e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ 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
25 changes: 8 additions & 17 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ jobs:
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
build: [
{runs-on: n150, name: "run"},
]

runs-on:
- in-service
- ${{ matrix.build.runs-on }}
- n150

container:
image: ghcr.io/tenstorrent/tt-torch/tt-torch-ci-ubuntu-22-04:latest
Expand All @@ -41,9 +36,10 @@ jobs:
id: strings
shell: bash
run: |
echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT"
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT"
echo "install-output-dir=$(pwd)/install" >> "$GITHUB_OUTPUT"
echo "test-dir=$(pwd)" >> "$GITHUB_OUTPUT"
echo "work-dir=$(pwd)../../" >> "$GITHUB_OUTPUT"
echo "build-output-dir=$(pwd)/../../build" >> "$GITHUB_OUTPUT"
echo "install-output-dir=$(pwd)/../../install" >> "$GITHUB_OUTPUT"
- name: Git safe dir
run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }}
Expand Down Expand Up @@ -73,13 +69,8 @@ jobs:
- name: Run PyTorch tests
shell: bash
run: |
echo ${{ steps.strings.outputs.test-dir }}
echo ${{ steps.strings.outputs.install-output-dir }}
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 ${{ steps.strings.outputs.test-dir }}

0 comments on commit 902b20e

Please sign in to comment.