Compare commits
3 Commits
main
...
precommit-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d5790aad1 | ||
|
|
f50ba0bb41 | ||
|
|
ae9539f8d4 |
28
.github/actions/moshi_build/action.yml
vendored
Executable file
28
.github/actions/moshi_build/action.yml
vendored
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
name: moshi_build
|
||||
description: 'Build env.'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10.14'
|
||||
- uses: actions/cache@v3
|
||||
id: cache
|
||||
with:
|
||||
path: env
|
||||
key: env-${{ hashFiles('moshi/pyproject.toml') }}
|
||||
- name: Install dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m venv env
|
||||
. env/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install moshi==0.2.6
|
||||
pip install pre-commit
|
||||
- name: Setup env
|
||||
shell: bash
|
||||
run: |
|
||||
source env/bin/activate
|
||||
pre-commit install
|
||||
17
.github/workflows/precommit.yml
vendored
Normal file
17
.github/workflows/precommit.yml
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
name: precommit
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
run_precommit:
|
||||
name: Run precommit
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/moshi_build
|
||||
- run: |
|
||||
. env/bin/activate
|
||||
bash .git/hooks/pre-commit
|
||||
Loading…
Reference in New Issue
Block a user