Skip to content

Build Linux

Build Linux #10

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build Linux
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
tf_version:
description: 'TensorFlow version to use (e.g., 2.18.0)'
required: true
default: 'v2.18.0'
type: string
# allows that other workflows can run this one
workflow_call:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ubuntu-24.04, ubuntu-24.04-arm]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
submodules: true
# setup bazel
- uses: bazel-contrib/[email protected]
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
# setup python 3.11
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# checkout tensorflow version
- name: Checkout tensorflow
run: |
cd tensorflow
git fetch --tags
git checkout ${{ github.event.inputs.tf_version }}
# build tf lite
- name: Build TF Lite base
run: ./build_tf_lite_linux.sh
#- name: Build TF Lite gpu delegate
# run: |
# sudo apt install mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils
# ./build_tf_lite_gpu_delegate_linux.sh
#- name: Build TF Lite flex delegate
# run: ./build_tf_lite_flex_delegate_linux.sh
# TODO run test
# upload the build libs as an artifact
- name: upload base library to artifacts
uses: actions/upload-artifact@v4
with:
name: libtensorflowlite_x86.so
path: ./tensorflow/libtensorflowlite_x86.so
#- name: upload gpu library to artifacts
# uses: actions/upload-artifact@v4
# with:
# name: tensorflowlite_gpu_x86.so
# path: ./tensorflow/tensorflowlite_gpu_x86.so
#- name: upload flex library to artifacts
# uses: actions/upload-artifact@v4
# with:
# name: libtensorflowlite_flex_x86.so
# path: ./tensorflow/libtensorflowlite_flex_x86.so