Skip to content

Commit

Permalink
#0: Workflow to test compatibility with TTNN Project Template
Browse files Browse the repository at this point in the history
  • Loading branch information
afuller-TT committed Oct 31, 2024
1 parent 5c967ad commit aa90c2a
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/cpp-ttnn-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build TTNN C++ project

on:
workflow_call:
workflow_dispatch:

jobs:

build-docker-image:
uses: ./.github/workflows/build-docker-artifact.yaml
secrets: inherit
with:
os: ubuntu-22.04-amd64

ttnn-project:
needs: build-docker-image
runs-on:
- ubuntu-22.04
env:
ARCH_NAME: wormhole_b0

steps:
# Metalium
- name: Clone Metalium
uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected]
- name: Generate docker tag
id: generate-docker-tag
uses: ./.github/actions/generate-docker-tag
with:
image: ubuntu-22.04-amd64
- 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: Move Repo A to Subdirectory
run: |
mkdir metalium
mv * metalium || true
mv .git metalium/.git
- name: Build Metalium
uses: addnab/docker-run-action@v3
with:
image: ${{ env.TT_METAL_DOCKER_IMAGE_TAG }}
options: |
--rm
--tmpfs /tmp
-u ${{ env.RUNNER_UID }}:${{ env.RUNNER_GID }}
-v ${{ github.workspace }}/metalium:${{ github.workspace }}
-v /etc/passwd:/etc/passwd:ro
-v /etc/shadow:/etc/shadow:ro
-v /etc/bashrc:/etc/bashrc:ro
-e ARCH_NAME=${{ env.ARCH_NAME }}
-w ${{ github.workspace }}
run: |
set -eu # basic shell hygiene
./build_metal.sh --disable-unity-builds --build-type Release
# TTNN project
- name: Checkout cpp-ttnn-project-template
uses: actions/checkout@v3
with:
repository: tenstorrent/cpp-ttnn-project-template
path: project
- name: Build TTNN Project
uses: addnab/docker-run-action@v3
with:
image: ${{ env.TT_METAL_DOCKER_IMAGE_TAG }}
options: |
--rm
--tmpfs /tmp
-u ${{ env.RUNNER_UID }}:${{ env.RUNNER_GID }}
-v ${{ github.workspace }}/metalium:${{ github.workspace }}/metalium
-v ${{ github.workspace }}/project:${{ github.workspace }}/project
-v /etc/passwd:/etc/passwd:ro
-v /etc/shadow:/etc/shadow:ro
-v /etc/bashrc:/etc/bashrc:ro
-e ARCH_NAME=${{ env.ARCH_NAME }}
-e TT_METAL_HOME=${{ github.workspace }}/metalium
-w ${{ github.workspace }}/project
run: |
set -eu # basic shell hygiene
mkdir -p build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja

0 comments on commit aa90c2a

Please sign in to comment.