Skip to content

Refactor our CI yamls #2

Refactor our CI yamls

Refactor our CI yamls #2

Workflow file for this run

# Builds device.
# Build is performed on all supported OS versions.
name: Build Device
on:
workflow_dispatch:
inputs:
timeout:
required: true
description: 'The timeout for the job in minutes'
type: number
default: 15
pull_request:
branches: ["main"]
push:
branches: ["main"]
env:
BUILD_TARGET: device
BUILD_OUTPUT_DIR: ./build
LIB_OUTPUT_DIR: ./build/lib
DEPS_OUTPUT_DIR: ./build/_deps
TEST_OUTPUT_DIR: ./build/test
CREATE_MAP_BINARIES_DIR: ./device/bin/silicon
jobs:
build:
timeout-minutes: ${{ inputs.timeout }}
strategy:
fail-fast: false
matrix:
build: [
{runs-on: ubuntu-22.04, docker-image: tt-umd-ci-ubuntu-22.04},
{runs-on: ubuntu-20.04, docker-image: tt-umd-ci-ubuntu-20.04},
]
name: Build device for any arch on ${{ matrix.build.runs-on }}
runs-on: ${{ matrix.build.runs-on }}
container:
image: ghcr.io/${{ github.repository }}/${{ matrix.build.docker-image }}:latest
options: --user root
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: 'true'
- name: Build ${{ env.BUILD_TARGET }}
run: |
echo "Compiling the code..."
cmake -B ${{ env.BUILD_OUTPUT_DIR }} -G Ninja
cmake --build ${{ env.BUILD_OUTPUT_DIR }} --target ${{ env.BUILD_TARGET }}
echo "Compile complete."