Skip to content

Commit

Permalink
adding ci and community stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
adefossez committed Sep 17, 2024
1 parent ccbe247 commit 46dea3a
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: 🐛 Bug Report
about: Submit a bug report to help us improve
labels: bug, triage
---

## 🐛 Bug Report

<!-- A clear and concise description of what the bug is -->

## To Reproduce

<!-- How to reproduce the bug -->

## Your Environment

<!-- Include as many relevant details about the environment you experienced the bug in.-->

**Please fill this part, failure to do so will lead to your issue being directly closed.**

- Backend impacted (Torch, MLX, or Rust):
- Operating system (OSX, Windows, Linux):
- Operating system version:

If the backend impacted is Torch:
- Python version:
- PyTorch version:
- CUDA version (run `python -c 'import torch; print(torch.version.cuda)'`):
- GPU model and memory:
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "❓Questions/Help/Support"
about: If you have a question about the paper, code or algorithm, please ask here!
labels: question, triage
---

## ❓ Questions

<!-- (Please ask your question here.) -->
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Test
27 changes: 27 additions & 0 deletions .github/actions/moshi_build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: moshi_build
description: 'Build env.'
runs:
using: "composite"
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- 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 -e './moshi[dev]'
- name: Setup env
shell: bash
run: |
. env/bin/activate
pre-commit install
17 changes: 17 additions & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: precommmit
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
84 changes: 84 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
on: [push, pull_request]

name: Continuous integration

jobs:
check:
name: Check
defaults:
run:
working-directory: ./rust
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable, nightly]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test Suite
defaults:
run:
working-directory: ./rust
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable, nightly]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test

fmt:
name: Rustfmt
defaults:
run:
working-directory: ./rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
defaults:
run:
working-directory: ./rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pre-commit>=3.8
pyright>=1.1
flake8>=7.1

0 comments on commit 46dea3a

Please sign in to comment.