From 9ffdda9843454fa1eaafac969a8c34bba40d8801 Mon Sep 17 00:00:00 2001 From: Vladimir Milosevic Date: Tue, 24 Dec 2024 11:14:48 +0000 Subject: [PATCH] Test checkout --- .github/workflows/build-and-test.yml | 140 ++++++++++++++------------- 1 file changed, 73 insertions(+), 67 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index dd7d22a25..85dcf65eb 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -28,6 +28,7 @@ on: description: 'Git SHA of commit in tenstorrent/tt-mlir or branch name' required: false type: string + push: permissions: checks: write @@ -98,15 +99,15 @@ jobs: create-symlink: true key: ${{ matrix.build.runs-on }}-runtime-${{ matrix.build.enable_runtime }}-${{ env.SDK_VERSION }} - - name: Build (creates tvm and tt-forge-fe wheels) - shell: bash - run: | - source env/activate - python3 setup.py bdist_wheel - cd third_party/tvm/python - python3 setup.py bdist_wheel - cd ../../.. - cp third_party/tvm/python/dist/*.whl dist/ + # - name: Build (creates tvm and tt-forge-fe wheels) + # shell: bash + # run: | + # source env/activate + # python3 setup.py bdist_wheel + # cd third_party/tvm/python + # python3 setup.py bdist_wheel + # cd ../../.. + # cp third_party/tvm/python/dist/*.whl dist/ # - name: Run Unit Tests # shell: bash @@ -114,21 +115,25 @@ jobs: # source env/activate # cmake --build ${{ steps.strings.outputs.build-output-dir }} -- run_unit_tests # - - name: Upload Build - uses: actions/upload-artifact@v4 - if: success() || failure() - with: - name: build-forge-ubuntu-latest - path: dist/*.whl + + # - name: Upload Build + # uses: actions/upload-artifact@v4 + # if: success() || failure() + # with: + # name: build-forge-ubuntu-latest + # path: dist/*.whl run-tests: - needs: forge-build + needs: + - forge-build + - docker-build + strategy: fail-fast: false matrix: build: [ - {runs-on: n150 }, - {runs-on: n300 }, + {runs-on: n150 }, + {runs-on: n300 }, ] test_group_id: [1,2] @@ -145,6 +150,7 @@ jobs: - /etc/udev/rules.d:/etc/udev/rules.d - /lib/modules:/lib/modules - /opt/tt_metal_infra/provisioning/provisioning_env:/opt/tt_metal_infra/provisioning/provisioning_env + steps: - name: Set reusable strings id: strings @@ -181,54 +187,54 @@ jobs: git submodule foreach --recursive git clean -ffdx git submodule foreach --recursive git reset --hard - - name: Use build artifacts - uses: actions/download-artifact@v4 - with: - name: build-forge-ubuntu-latest - - - name: Install wheel - shell: bash - run: | - source env/activate - pip install dist/*tvm*.whl - pip install dist/*tt_forge_fe*.whl - - - name: Run Test - env: - HF_TOKEN: ${{ secrets.HF_TOKEN }} - HF_HUB_DISABLE_PROGRESS_BARS: 1 - shell: bash - run: | - source env/activate - apt-get update - apt install -y libgl1 libglx-mesa0 - set -o pipefail # Ensures that the exit code reflects the first command that fails - pip install pytest-split - pytest -m push --splits 2 \ - --group ${{ matrix.test_group_id }} \ - --splitting-algorithm least_duration \ - -m "${{ inputs.test_mark }}" \ - --junit-xml=${{ steps.strings.outputs.test_report_path }} \ - 2>&1 | tee pytest.log - - - name: Upload Test Log - uses: actions/upload-artifact@v4 - if: success() || failure() - with: - name: test-log-${{ matrix.build.runs-on }}-${{ matrix.test_group_id }} - path: pytest.log + # - name: Use build artifacts + # uses: actions/download-artifact@v4 + # with: + # name: build-forge-ubuntu-latest - - name: Upload Test Report - uses: actions/upload-artifact@v4 - if: success() || failure() - with: - name: test-reports-${{ matrix.build.runs-on }}-${{ matrix.test_group_id }} - path: ${{ steps.strings.outputs.test_report_path }} + # - name: Install wheel + # shell: bash + # run: | + # source env/activate + # pip install dist/*tvm*.whl + # pip install dist/*tt_forge_fe*.whl - - name: Show Test Report - uses: mikepenz/action-junit-report@v4 - if: success() || failure() - with: - report_paths: ${{ steps.strings.outputs.test_report_path }} - check_name: TT-Forge-FE Tests - comment: true + # - name: Run Test + # env: + # HF_TOKEN: ${{ secrets.HF_TOKEN }} + # HF_HUB_DISABLE_PROGRESS_BARS: 1 + # shell: bash + # run: | + # source env/activate + # apt-get update + # apt install -y libgl1 libglx-mesa0 + # set -o pipefail # Ensures that the exit code reflects the first command that fails + # pip install pytest-split + # pytest -m push --splits 2 \ + # --group ${{ matrix.test_group_id }} \ + # --splitting-algorithm least_duration \ + # -m "${{ inputs.test_mark }}" \ + # --junit-xml=${{ steps.strings.outputs.test_report_path }} \ + # 2>&1 | tee pytest.log + + # - name: Upload Test Log + # uses: actions/upload-artifact@v4 + # if: success() || failure() + # with: + # name: test-log-${{ matrix.build.runs-on }}-${{ matrix.test_group_id }} + # path: pytest.log + + # - name: Upload Test Report + # uses: actions/upload-artifact@v4 + # if: success() || failure() + # with: + # name: test-reports-${{ matrix.build.runs-on }}-${{ matrix.test_group_id }} + # path: ${{ steps.strings.outputs.test_report_path }} + + # - name: Show Test Report + # uses: mikepenz/action-junit-report@v4 + # if: success() || failure() + # with: + # report_paths: ${{ steps.strings.outputs.test_report_path }} + # check_name: TT-Forge-FE Tests + # comment: true