[Benchmark] Add the initial infrastructure for tracking the benchmark… #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build in Docker | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
- runs-on: runner | |
runs-on: ${{ matrix.build.runs-on }} | |
container: | |
image: ghcr.io/${{ github.repository }}/tt-forge-fe-ubuntu-22-04:latest | |
options: --user root --device /dev/tenstorrent/0 | |
volumes: | |
- /dev/hugepages:/dev/hugepages | |
- /dev/hugepages-1G:/dev/hugepages-1G | |
- /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 | |
shell: bash | |
run: | | |
echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT" | |
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT" | |
- name: Git safe dir | |
run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 # Fetch all history and tags | |
# Clean everything from submodules (needed to avoid issues | |
# with cmake generated files leftover from previous builds) | |
- name: Cleanup submodules | |
run: | | |
git submodule foreach --recursive git clean -ffdx | |
git submodule foreach --recursive git reset --hard | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
create-symlink: true | |
key: ${{ matrix.build.runs-on }}-runtime-${{ matrix.build.enable_runtime }}-${{ env.SDK_VERSION }} | |
- name: Build | |
shell: bash | |
run: | | |
source env/activate | |
cmake -G Ninja \ | |
-B ${{ steps.strings.outputs.build-output-dir }} \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} | |
- name: Run Test | |
shell: bash | |
run: | | |
source env/activate | |
pytest | |
- name: Upload Test Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports-${{ matrix.build.runs-on }} | |
path: reports/report.xml | |
- name: Show Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: reports/report.xml | |
check_name: TT-Forge-FE Tests |