2023-04-21 22:44:52 +00:00
|
|
|
---
|
|
|
|
name: 'tests'
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
2023-05-19 06:31:11 +00:00
|
|
|
concurrency:
|
|
|
|
group: ci-tests-${{ github.head_ref || github.ref }}-${{ github.repository }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-04-21 22:44:52 +00:00
|
|
|
jobs:
|
|
|
|
ubuntu-latest:
|
|
|
|
runs-on: ubuntu-latest
|
2023-08-21 20:16:47 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-08-23 23:18:58 +00:00
|
|
|
go-version: ['1.21.x']
|
2023-04-21 22:44:52 +00:00
|
|
|
steps:
|
2023-10-12 16:09:56 +00:00
|
|
|
- name: Release space from worker
|
|
|
|
run: |
|
|
|
|
echo "Listing top largest packages"
|
|
|
|
pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr)
|
|
|
|
head -n 30 <<< "${pkgs}"
|
|
|
|
echo
|
|
|
|
df -h
|
|
|
|
echo
|
|
|
|
sudo apt-get remove -y '^llvm-.*|^libllvm.*' || true
|
|
|
|
sudo apt-get remove --auto-remove android-sdk-platform-tools || true
|
|
|
|
sudo apt-get purge --auto-remove android-sdk-platform-tools || true
|
|
|
|
sudo rm -rf /usr/local/lib/android
|
|
|
|
sudo apt-get remove -y '^dotnet-.*|^aspnetcore-.*' || true
|
|
|
|
sudo rm -rf /usr/share/dotnet
|
|
|
|
sudo apt-get remove -y '^mono-.*' || true
|
|
|
|
sudo apt-get remove -y '^ghc-.*' || true
|
|
|
|
sudo apt-get remove -y '.*jdk.*|.*jre.*' || true
|
|
|
|
sudo apt-get remove -y 'php.*' || true
|
|
|
|
sudo apt-get remove -y hhvm powershell firefox monodoc-manual msbuild || true
|
|
|
|
sudo apt-get remove -y '^google-.*' || true
|
|
|
|
sudo apt-get remove -y azure-cli || true
|
|
|
|
sudo apt-get remove -y '^mongo.*-.*|^postgresql-.*|^mysql-.*|^mssql-.*' || true
|
|
|
|
sudo apt-get remove -y '^gfortran-.*' || true
|
|
|
|
sudo apt-get autoremove -y
|
|
|
|
sudo apt-get clean
|
|
|
|
echo
|
|
|
|
echo "Listing top largest packages"
|
|
|
|
pkgs=$(dpkg-query -Wf '${Installed-Size}\t${Package}\t${Status}\n' | awk '$NF == "installed"{print $1 "\t" $2}' | sort -nr)
|
|
|
|
head -n 30 <<< "${pkgs}"
|
|
|
|
echo
|
|
|
|
sudo rm -rfv build || true
|
|
|
|
df -h
|
2023-04-21 22:44:52 +00:00
|
|
|
- name: Clone
|
2023-10-21 06:55:44 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-21 22:44:52 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2023-08-21 20:16:47 +00:00
|
|
|
- name: Setup Go ${{ matrix.go-version }}
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
# You can test your matrix by printing the current Go version
|
|
|
|
- name: Display Go version
|
|
|
|
run: go version
|
2023-04-21 22:44:52 +00:00
|
|
|
- name: Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-05-12 08:04:20 +00:00
|
|
|
sudo apt-get install build-essential ffmpeg
|
2023-10-16 19:46:29 +00:00
|
|
|
|
2023-07-14 23:19:43 +00:00
|
|
|
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
|
2023-07-20 21:45:29 +00:00
|
|
|
sudo pip install -r extra/requirements.txt
|
2023-07-14 23:19:43 +00:00
|
|
|
|
2023-10-16 19:46:29 +00:00
|
|
|
|
|
|
|
# Pre-build stable diffusion before we install a newever version of abseil (not compatible with stablediffusion-ncn)
|
|
|
|
GO_TAGS="tts stablediffusion" GRPC_BACKENDS=backend-assets/grpc/stablediffusion make build
|
|
|
|
|
2023-07-14 23:19:43 +00:00
|
|
|
sudo mkdir /build && sudo chmod -R 777 /build && cd /build && \
|
2023-07-14 23:19:43 +00:00
|
|
|
curl -L "https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz" | \
|
2023-07-14 23:19:43 +00:00
|
|
|
tar -xzvf - && \
|
2023-07-14 23:19:43 +00:00
|
|
|
mkdir -p "spdlog-1.11.0/build" && \
|
|
|
|
cd "spdlog-1.11.0/build" && \
|
2023-07-14 23:19:43 +00:00
|
|
|
cmake .. && \
|
|
|
|
make -j8 && \
|
|
|
|
sudo cmake --install . --prefix /usr && mkdir -p "lib/Linux-$(uname -m)" && \
|
|
|
|
cd /build && \
|
|
|
|
mkdir -p "lib/Linux-$(uname -m)/piper_phonemize" && \
|
2023-07-14 23:19:43 +00:00
|
|
|
curl -L "https://github.com/rhasspy/piper-phonemize/releases/download/v1.0.0/libpiper_phonemize-amd64.tar.gz" | \
|
2023-07-14 23:19:43 +00:00
|
|
|
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/. /usr/lib/ && \
|
2023-07-28 17:40:21 +00:00
|
|
|
sudo ln -s /usr/lib/libpiper_phonemize.so /usr/lib/libpiper_phonemize.so.1 && \
|
2023-07-14 23:19:43 +00:00
|
|
|
sudo cp -rfv /build/lib/Linux-$(uname -m)/piper_phonemize/include/. /usr/include/
|
2023-10-16 19:46:29 +00:00
|
|
|
|
|
|
|
git clone --recurse-submodules -b v1.58.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
|
|
|
|
cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \
|
|
|
|
-DgRPC_BUILD_TESTS=OFF \
|
|
|
|
../.. && sudo make -j12 install
|
|
|
|
|
2023-04-21 22:44:52 +00:00
|
|
|
- name: Test
|
|
|
|
run: |
|
2023-07-14 23:19:43 +00:00
|
|
|
ESPEAK_DATA="/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data" GO_TAGS="tts stablediffusion" make test
|
2023-04-21 22:44:52 +00:00
|
|
|
|
2023-04-22 09:05:23 +00:00
|
|
|
macOS-latest:
|
|
|
|
runs-on: macOS-latest
|
2023-08-21 20:16:47 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-08-23 23:18:58 +00:00
|
|
|
go-version: ['1.21.x']
|
2023-04-22 09:05:23 +00:00
|
|
|
steps:
|
|
|
|
- name: Clone
|
2023-10-21 06:55:44 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-22 09:05:23 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2023-08-21 20:16:47 +00:00
|
|
|
- name: Setup Go ${{ matrix.go-version }}
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
# You can test your matrix by printing the current Go version
|
|
|
|
- name: Display Go version
|
|
|
|
run: go version
|
2023-10-16 19:46:29 +00:00
|
|
|
- name: Dependencies
|
|
|
|
run: |
|
|
|
|
git clone --recurse-submodules -b v1.58.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc && \
|
|
|
|
cd grpc && mkdir -p cmake/build && cd cmake/build && cmake -DgRPC_INSTALL=ON \
|
|
|
|
-DgRPC_BUILD_TESTS=OFF \
|
|
|
|
../.. && make -j12 install && rm -rf grpc
|
2023-04-22 09:05:23 +00:00
|
|
|
- name: Test
|
|
|
|
run: |
|
2023-10-16 19:46:29 +00:00
|
|
|
export C_INCLUDE_PATH=/usr/local/include
|
|
|
|
export CPLUS_INCLUDE_PATH=/usr/local/include
|
2023-06-18 06:27:29 +00:00
|
|
|
CMAKE_ARGS="-DLLAMA_F16C=OFF -DLLAMA_AVX512=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF" make test
|