buzz/.github/workflows/test.yml
Workflow config file is invalid. Please check your config file: Line: 67 Column 5: Failed to match job-factory: Line: 68 Column 5: Unknown Property matrix Line: 67 Column 5: Failed to match workflow-job: Line: 68 Column 5: Unknown Property matrix Line: 70 Column 5: Unknown Property steps Forgejo Actions YAML Schema validation error
Chidi Williams fcc0c4ad10 Add ARM build
2023-01-15 13:47:29 +00:00

121 lines
3.1 KiB
YAML

---
name: Test
on:
push:
branches:
- main
tags:
- '*'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
windows-latest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10.7'
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-Windows-${{ hashFiles('**/poetry.lock') }}-2
- name: Load cached Whisper models
id: cached-whisper-models
uses: actions/cache@v3
with:
path: |
~/.cache/whisper
~/.cache/huggingface
~/AppData/Local/Buzz/Buzz/Cache
key: whisper-models-Windows
- uses: FedericoCarboni/setup-ffmpeg@v1
id: setup-ffmpeg
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: poetry config experimental.new-installer false && poetry install
- name: Test
run: poetry run make test
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
flags: Windows
macos-latest:
runs-on: macos-latest
matrix:
cpu: [ intel, arm ]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: '3.10.7'
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-macOS-${{ hashFiles('**/poetry.lock') }}-2
- name: Load cached Whisper models
id: cached-whisper-models
uses: actions/cache@v3
with:
path: |
~/Library/Caches/Buzz
~/.cache/whisper
~/.cache/huggingface
key: whisper-models-macOS
- uses: FedericoCarboni/setup-ffmpeg@v1
id: setup-ffmpeg
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: poetry config experimental.new-installer false && poetry install
- name: Test
run: |
if [[ ${{ matrix.cpu }} == "intel" ]]; then
poetry run make test;
else
poetry run make whisper_cpp CMAKE_FLAGS="-DWHISPER_NO_AVX=ON -DWHISPER_NO_AVX2=ON -DWHISPER_NO_FMA=ON";
fi
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
flags: macOS-${{ matrix.cpu }}