Skip to content

Commit 855ab4a

Browse files
tt-fustiniasrinivasanTT
authored andcommitted
add workflow build.yaml
1 parent 45951f4 commit 855ab4a

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Tenstorrent Blackhole kernel build
2+
3+
on:
4+
push:
5+
pull_request:
6+
paths-ignore:
7+
- '.github/**'
8+
branches: [ tt-blackhole ]
9+
10+
env:
11+
NUM_JOBS: 6
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
include:
19+
- name: riscv
20+
arch: riscv
21+
defconfig: blackhole_defconfig
22+
kernel: kernel
23+
24+
steps:
25+
- name: Update install
26+
run:
27+
sudo apt-get update
28+
29+
- name: Install toolchain
30+
run:
31+
sudo apt-get install gcc-riscv64-linux-gnu
32+
timeout-minutes: 5
33+
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 1
37+
clean: true
38+
39+
- name: Build kernel ${{matrix.name}}
40+
run: |
41+
mkdir ${{github.workspace}}/build
42+
export ARCH=${{matrix.arch}}
43+
export CROSS_COMPILE=riscv64-linux-gnu-
44+
export DTS_SUBDIR=tenstorrent
45+
export IMAGE=Image
46+
make O=${{github.workspace}}/build ${{matrix.defconfig}}
47+
make O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} $IMAGE modules dtbs
48+
make O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
49+
mkdir -p ${{github.workspace}}/install/boot
50+
cp ${{github.workspace}}/build/arch/${ARCH}/boot/dts/${DTS_SUBDIR}/*.dtb ${{github.workspace}}/install/boot/
51+
cp ${{github.workspace}}/build/arch/${ARCH}/boot/$IMAGE ${{github.workspace}}/install/boot/${{matrix.kernel}}.img
52+
53+
- name: Tar build
54+
run: tar -cvf ${{matrix.name}}_build.tar -C ${{github.workspace}}/install .
55+
56+
- name: Upload results
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: ${{matrix.name}}_build
60+
path: ${{matrix.name}}_build.tar
61+
retention-days: 90

0 commit comments

Comments
 (0)