Skip to content

armgit / uzu

Public Imported from GitHub
0

A high-performance inference engine for AI models

ci: add Linux CPU build check (#437 follow-up) (#442)

Stan SKY943d55dbcb7b
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 46fbf5d64..d75e4a49f 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -26,6 +26,10 @@ inputs:
description: "Install bindings requirements"
required: false
default: 'false'
+ linux:
+ description: "Install Linux system dependencies"
+ required: false
+ default: 'false'
runs:
using: composite
@@ -49,6 +53,10 @@ runs:
with:
components: ${{ inputs.linters == 'true' && 'rustfmt' || '' }}
+ - if: inputs.linux == 'true'
+ run: sudo apt-get update && sudo apt-get install -y libasound2-dev
+ shell: bash
+
- if: inputs.target == 'wasm32-wasip1-threads'
uses: bytecodealliance/actions/wasmtime/setup@v1
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index be22f493f..b9b3fd3ee 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -55,22 +55,30 @@ jobs:
tests:
name: ${{ matrix.backend }}
+ ${{ matrix.host == 'linux' && ' (linux)' || '' }}
${{ matrix.tracing && ' (tracing)' || '' }}
${{ matrix.grammar && ' (grammar)' || '' }}
${{ matrix.target != '' && format(' ({0})', matrix.target) || '' }}
- runs-on: [ self-hosted, macos, mac, arm64 ]
+ runs-on: ${{ matrix.host == 'linux' && 'ubuntu-latest' || fromJSON('["self-hosted","macos","mac","arm64"]') }}
strategy:
matrix:
backend: [ 'cpu', 'metal' ]
+ host: [ 'macos' ]
target: [ '' ]
tracing: [ false, true ]
include:
- grammar: true
- backend: 'cpu'
+ host: 'macos'
target: 'wasm32-wasip1-threads'
tracing: false
grammar: false
+ - backend: 'cpu'
+ host: 'linux'
+ target: ''
+ tracing: false
+ grammar: false
exclude:
- backend: 'cpu'
tracing: true
@@ -89,12 +97,13 @@ jobs:
- uses: ./.github/actions/setup
with:
metal: ${{ matrix.backend == 'metal' }}
- test_data: true
- nextest: true
+ test_data: ${{ matrix.host != 'linux' }}
+ nextest: ${{ matrix.host != 'linux' }}
target: ${{ matrix.target }}
+ linux: ${{ matrix.host == 'linux' }}
- name: Build crates
- run: cargo +stable build --no-default-features $FEATURE_FLAGS ${{ matrix.target == 'wasm32-wasip1-threads' && '-p uzu' || '' }}
+ run: cargo +stable build --no-default-features $FEATURE_FLAGS ${{ matrix.target == 'wasm32-wasip1-threads' && '-p uzu' || '' }} ${{ matrix.host == 'linux' && '-p cli --features backend-cpu,capability-cli' || '' }}
- name: Build benches
if: ${{ matrix.backend != 'cpu' && !matrix.tracing }}