mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-25 15:21:04 +00:00
e459f114cd
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
---
|
|
name: 'tests'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- '*'
|
|
|
|
concurrency:
|
|
group: ci-tests-${{ github.head_ref || github.ref }}-${{ github.repository }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
ubuntu-latest:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install build-essential ffmpeg
|
|
|
|
sudo apt-get install -y ca-certificates cmake curl patch
|
|
sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2
|
|
sudo pip install -r extra/requirements.txt
|
|
|
|
sudo mkdir /build && sudo chmod -R 777 /build && cd /build && \
|
|
curl -L "https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz" | \
|
|
tar -xzvf - && \
|
|
mkdir -p "spdlog-1.11.0/build" && \
|
|
cd "spdlog-1.11.0/build" && \
|
|
cmake .. && \
|
|
make -j8 && \
|
|
sudo cmake --install . --prefix /usr && mkdir -p "lib/Linux-$(uname -m)" && \
|
|
cd /build && \
|
|
mkdir -p "lib/Linux-$(uname -m)/piper_phonemize" && \
|
|
curl -L "https://github.com/rhasspy/piper-phonemize/releases/download/v1.0.0/libpiper_phonemize-amd64.tar.gz" | \
|
|
tar -C "lib/Linux-$(uname -m)/piper_phonemize" -xzvf - && ls -liah /build/lib/Linux-$(uname -m)/piper_phonemize/ && \
|
|
sudo cp -rfv /build/lib/Linux-$(uname -m)/piper_phonemize/lib/. /lib64/ && \
|
|
sudo cp -rfv /build/lib/Linux-$(uname -m)/piper_phonemize/lib/. /usr/lib/ && \
|
|
sudo cp -rfv /build/lib/Linux-$(uname -m)/piper_phonemize/include/. /usr/include/
|
|
- name: Test
|
|
run: |
|
|
ESPEAK_DATA="/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data" GO_TAGS="tts stablediffusion" make test
|
|
|
|
macOS-latest:
|
|
runs-on: macOS-latest
|
|
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Test
|
|
run: |
|
|
CMAKE_ARGS="-DLLAMA_F16C=OFF -DLLAMA_AVX512=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF" make test |