Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#13065: Use the same action for building and running #13066

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/docker-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ runs:
${{ inputs.device }}
-w ${{ github.workspace }}
run: |
if [ ${{ inputs.install_wheel }} ]; then
if [ ${{ inputs.install_wheel }} = "true" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use as a string comparison - the value is not actually boolean. There is an existing Github issue:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it matter if its "" or ''?
I didn't realize this was a thing so maybe we should double check if we have other comparisons here too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both "" and '' evaluate to a string in bash so it does not matter.
Do you think '' is more consistent?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think as long as we stick to one convention it is fine.

WHEEL_FILENAME=$(ls -1 *.whl)
pip3 install $WHEEL_FILENAME
fi
Expand Down
29 changes: 4 additions & 25 deletions .github/workflows/build-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,37 +84,16 @@ jobs:
- name: Update submodules
run: |
git submodule update --init --recursive
- name: Generate docker tag
id: generate-docker-tag
uses: ./.github/actions/generate-docker-tag
with:
image: ${{ inputs.os }}
- name: Docker login
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull docker image
run: docker pull ${{ env.TT_METAL_DOCKER_IMAGE_TAG }}
- name: Build tt-metal and libs
uses: addnab/docker-run-action@v3
uses: ./.github/actions/docker-run
with:
image: ${{ env.TT_METAL_DOCKER_IMAGE_TAG }}
options: |
--rm
-u ${{ env.RUNNER_UID }}:${{ env.RUNNER_GID }}
-v ${{ github.workspace }}:${{ github.workspace }}
-v /etc/passwd:/etc/passwd:ro
-v /etc/shadow:/etc/shadow:ro
-v /etc/bashrc:/etc/bashrc:ro
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_opts: |
-e ARCH_NAME=${{ matrix.arch }}
-w ${{ github.workspace }}
run: |
run_args: |
nice -n 19 cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DENABLE_TRACY=${{ inputs.tracy }}
nice -n 19 cmake --build build --target tests
nice -n 19 cmake --build build --target install

- name: 'Tar files'
run: tar -cvf ttm_${{ matrix.arch }}.tar build/lib ttnn/ttnn/*.so build/programming_examples build/test build/tools runtime
- name: 'Upload Artifact'
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ttnn-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ jobs:
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
with:
docker_username: ${{ github.actor }}
install_wheel: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this in the code rebase

docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_image_arch: ${{ inputs.arch }}
run_args: |
WHEEL_FILENAME=$(ls -1 *.whl)
pip3 install --user $WHEEL_FILENAME
${{ matrix.test-group.cmd }}
- uses: ./.github/actions/slack-report
if: ${{ failure() }}
Expand Down
Loading