-
Notifications
You must be signed in to change notification settings - Fork 7
112 lines (100 loc) · 3.05 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Run tests on the specified architecture and card, on all supported OS versions.
name: Run Tests
on:
workflow_call:
inputs:
arch:
required: true
type: string
ubuntu-version:
required: true
type: string
card:
required: true
type: string
timeout:
required: true
type: number
workflow_dispatch:
inputs:
arch:
required: true
description: 'The architecture to build for'
type: choice
options:
- grayskull
- wormhole_b0
- blackhole
ubuntu-version:
required: true
description: 'The version of Ubuntu to build on'
type: choice
options:
- ubuntu-22.04
- ubuntu-20.04
card:
required: true
description: 'The card to run tests on'
type: choice
options:
- e75
- e150
- e300
- n150
- n300
timeout:
required: true
description: 'The timeout for the build job in minutes'
type: number
env:
BUILD_OUTPUT_DIR: ./build
TEST_OUTPUT_DIR: ./build/test
CREATE_MAP_BINARIES_DIR: ./device/bin/silicon
jobs:
test:
# Due to parsing bug, fromJSON is used to convert string to number
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
name: Run tests for ${{ inputs.arch }} on ${{ inputs.card }} on ${{ inputs.ubuntu-version }}
runs-on:
- self-hosted
- ${{ inputs.card }}
container:
image: ghcr.io/${{ github.repository }}/tt-umd-ci-${{ inputs.ubuntu-version }}: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
env:
ARCH_NAME: ${{ inputs.arch }}
LD_LIBRARY_PATH: ./build/lib
steps:
- name: Cleanup tt-umd dir, and change directory as if we were in a github.repository
run: |
rm -rf tt-umd
mkdir tt-umd
cd tt-umd
- name: Use build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts-${{ inputs.arch }}-${{ inputs.ubuntu-version }}
path: ./
# This is needed to preserve file permissions
# https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
- name: 'Untar build artifacts'
shell: bash
run: tar xvf artifact.tar
- name: Run arch-specific UMD unit tests
run: |
${{ env.TEST_OUTPUT_DIR }}/umd/${{ inputs.arch }}/unit_tests
- name: Run PCI tests
run: |
${{ env.TEST_OUTPUT_DIR }}/umd/test_pcie_device/test_pcie_device
- name: Run API tests
run: |
${{ env.TEST_OUTPUT_DIR }}/umd/api/api_tests
- name: Run MISC tests
run: |
${{ env.TEST_OUTPUT_DIR }}/umd/misc/umd_misc_tests