Skip to content

Commit

Permalink
#8068: Remove many spurious workflows
Browse files Browse the repository at this point in the history
 - Make the docs workflow callable from all commits
 - Make the job dependent onto fd-tests and sd-tests
 - Do not gate on tests success and use build machine so that the performance is more acceptable
 - Add a wrapper workflow to use build artifacts
  • Loading branch information
dimitri-tenstorrent authored and TT-billteng committed May 7, 2024
1 parent 8a9af70 commit cc1ab0d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 74 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/all-post-commit-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
push:
branches: ["main", "fd-2/main"]

permissions:
actions: read
contents: read
pages: write
id-token: write

jobs:
static-checks:
uses: ./.github/workflows/all-static-checks.yaml
Expand All @@ -27,6 +33,10 @@ jobs:
eager-package-main:
uses: ./.github/workflows/eager-package-main.yaml
secrets: inherit
build-docs:
needs: build-artifact
uses: ./.github/workflows/docs-latest-public.yaml
secrets: inherit
build:
uses: ./.github/workflows/build.yaml
secrets: inherit
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/docs-latest-public-wrapper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: post-commit - Docs Build latest docs and deploy to GitHub pages on main

on:
workflow_dispatch:

jobs:
build-artifact:
uses: ./.github/workflows/build-artifact.yaml
secrets: inherit
build-docs:
needs: build-artifact
uses: ./.github/workflows/docs-latest-public.yaml
secrets: inherit
46 changes: 20 additions & 26 deletions .github/workflows/docs-latest-public.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
name: Docs - Build latest docs and deploy to GitHub pages on main
name: Internal - Docs Build latest docs and deploy to GitHub pages on main

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
actions: read
contents: read
pages: write
id-token: write
workflow_call:

concurrency:
# Note that people may spam the post-commit pipeline on their branch, and
Expand All @@ -31,32 +23,34 @@ jobs:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
DOCS_VERSION: latest
ARCH_NAME: ${{ matrix.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
environment: dev
runs-on: ubuntu-20.04
runs-on: ${{ matrix.arch }}
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- uses: ./.github/actions/install-metal-deps
with:
os: ubuntu-20.04
- uses: ./.github/actions/install-metal-dev-deps
with:
os: ubuntu-20.04
- name: Build tt-metal
- name: Set up dynamic env vars for build
run: |
export TT_METAL_HOME=$(pwd)
make build
- name: Activate docs environment and build docs
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Build Docs
timeout-minutes: 15
run: |
export PYTHONPATH=$(pwd)
source build/python_env/bin/activate
cd docs/
make html
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
./tests/scripts/run_build_docs.sh
- name: Build additional ttnn sweeps docs
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
export PYTHONPATH=$(pwd)
source build/python_env/bin/activate
source ${{ github.workspace }}/python_env/bin/activate
cd docs/
make ttnn_sweeps/check_directory
make ttnn_sweeps
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/fast-dispatch-build-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,45 +62,6 @@ jobs:
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
${{ matrix.test-group.cmd }}
build-docs:
strategy:
# Do not fail-fast because we need to ensure all tests go to completion
# so we try not to get hanging machines
fail-fast: false
matrix:
runner-info: [
# E150
{arch: grayskull, runs-on: ["grayskull"]},
# N150
{arch: wormhole_b0, runs-on: ["wormhole_b0", "multi-chip-num-pcie-1", "multi-chip-num-chips-1"]},
# N300
{arch: wormhole_b0, runs-on: ["wormhole_b0", "multi-chip-num-pcie-1", "multi-chip-num-chips-2"]},
]
env:
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }}
ARCH_NAME: ${{ matrix.runner-info.arch }}
LOGURU_LEVEL: INFO
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on: ${{ matrix.runner-info.runs-on }}
steps:
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: TTMetal_build_${{ matrix.runner-info.arch }}
- name: Extract files
run: tar -xvf ttm_${{ matrix.runner-info.arch }}.tar
- uses: ./.github/actions/install-python-deps
- name: Build Docs
timeout-minutes: 15
run: |
source ${{ github.workspace }}/python_env/bin/activate
cd $TT_METAL_HOME
export PYTHONPATH=$TT_METAL_HOME
./tests/scripts/run_build_docs.sh
multi-queue-single-device-tests:
strategy:
# Do not fail-fast because we need to ensure all tests go to completion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ export PYTHONPATH=$TT_METAL_HOME

./tests/scripts/run_cpp_unit_tests.sh

# build docs
./tests/scripts/run_build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,3 @@ export PYTHONPATH=$TT_METAL_HOME
./tests/scripts/run_cpp_fd2_tests.sh

./tests/scripts/run_cpp_unit_tests.sh

echo "Checking docs build..."

cd $TT_METAL_HOME/docs
python -m pip install -r requirements-docs.txt
make clean
make html

0 comments on commit cc1ab0d

Please sign in to comment.