Migrate to Codeberg
This commit is contained in:
parent
e3d67d513b
commit
e3dc30a7a8
5 changed files with 21 additions and 89 deletions
76
.github/workflows/pr.yml
vendored
76
.github/workflows/pr.yml
vendored
|
|
@ -1,76 +0,0 @@
|
||||||
name: Check code
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
rustfmt:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out code into the proper directory
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
|
|
||||||
- name: Cache rust
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Install rust
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
run: cargo fmt --check
|
|
||||||
|
|
||||||
|
|
||||||
clippy:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
||||||
rust-version: [ stable, nightly ]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out code into the proper directory
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
|
|
||||||
- name: Cache rust
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Install rust
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.rust-version }}
|
|
||||||
components: clippy
|
|
||||||
|
|
||||||
- name: Check clippy lints
|
|
||||||
run: cargo clippy
|
|
||||||
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
||||||
rust-version: [ stable, nightly ]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- name: Check out code into the proper directory
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
|
|
||||||
- name: Cache rust
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Install rust
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
|
||||||
with:
|
|
||||||
toolchain: ${{ matrix.rust-version }}
|
|
||||||
|
|
||||||
- name: Check build
|
|
||||||
run: cargo build -F log_backend,tracing_backend --verbose --examples
|
|
||||||
22
BUILDING.md
22
BUILDING.md
|
|
@ -1,4 +1,5 @@
|
||||||
# Running on Arch Linux
|
# Running on Arch Linux
|
||||||
|
|
||||||
`sudo pacman -Syy llvm clang cmake`
|
`sudo pacman -Syy llvm clang cmake`
|
||||||
`cargo build`
|
`cargo build`
|
||||||
|
|
||||||
|
|
@ -6,18 +7,21 @@
|
||||||
|
|
||||||
The following are instructions for building whisper-rs on Windows using the msys2 set of compilers.
|
The following are instructions for building whisper-rs on Windows using the msys2 set of compilers.
|
||||||
|
|
||||||
1. install msys2/mingw by following [https://code.visualstudio.com/docs/cpp/config-mingw](`https://code.visualstudio.com/docs/cpp/config-mingw`)
|
1. install msys2/mingw by following [https://code.visualstudio.com/docs/cpp/config-mingw](
|
||||||
1. Install g++ and make within msys2 ucrt64
|
`https://code.visualstudio.com/docs/cpp/config-mingw`)
|
||||||
- `pacman -S --needed base-devel mingw-w64-x86_64-toolchain`
|
1. Install g++ and make within msys2 ucrt64
|
||||||
2. Add the msys2 ucrt64 bin folder to path `C:\msys64\ucrt64\bin`
|
- `pacman -S --needed base-devel mingw-w64-x86_64-toolchain`
|
||||||
|
2. Add the msys2 ucrt64 bin folder to path `C:\msys64\ucrt64\bin`
|
||||||
2. Install make by running `pacman -S make` in msys2 ucrt66
|
2. Install make by running `pacman -S make` in msys2 ucrt66
|
||||||
3. Set rust to use msys2: by running `rustup toolchain install stable-x86_64-pc-windows-gnu` in Windows Powershell/Cmd
|
3. Set rust to use msys2: by running `rustup toolchain install stable-x86_64-pc-windows-gnu` in Windows Powershell/Cmd
|
||||||
4. Add `.cargo/config.toml` file in the project with the following contents:
|
4. Add `.cargo/config.toml` file in the project with the following contents:
|
||||||
|
|
||||||
```
|
```
|
||||||
[target.x86_64-pc-windows-gnu]
|
[target.x86_64-pc-windows-gnu]
|
||||||
linker = "C:\\msys64\\ucrt64\\bin\\gcc.exe"
|
linker = "C:\\msys64\\ucrt64\\bin\\gcc.exe"
|
||||||
ar = "C:\\msys64\\ucrt64\\bin\\ar.exe"
|
ar = "C:\\msys64\\ucrt64\\bin\\ar.exe"
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Run `cargo run` in Windows Powershell/Cmd
|
5. Run `cargo run` in Windows Powershell/Cmd
|
||||||
|
|
||||||
# Running on Windows using Microsoft Visual Studio C++
|
# Running on Windows using Microsoft Visual Studio C++
|
||||||
|
|
@ -31,11 +35,15 @@ Make sure you have installed and in the path:
|
||||||
- LLVM(clang)
|
- LLVM(clang)
|
||||||
|
|
||||||
### Instructions (for builds with `cuda` enabled)
|
### Instructions (for builds with `cuda` enabled)
|
||||||
|
|
||||||
1. Download [CUDA](https://developer.nvidia.com/cuda-downloads?target_os=Windows)
|
1. Download [CUDA](https://developer.nvidia.com/cuda-downloads?target_os=Windows)
|
||||||
2. Download [Visual Studio with Desktop C++ and Clang enabled](https://visualstudio.microsoft.com/de/downloads/) (see clang link below for installer walkthrough)
|
2. Download [Visual Studio with Desktop C++ and Clang enabled](https://visualstudio.microsoft.com/de/downloads/) (see
|
||||||
|
clang link below for installer walkthrough)
|
||||||
3. Download [CLANG](https://www.wikihow.com/Install-Clang-on-Windows)
|
3. Download [CLANG](https://www.wikihow.com/Install-Clang-on-Windows)
|
||||||
4. Download [CMAKE](https://cmake.org/download/)
|
4. Download [CMAKE](https://cmake.org/download/)
|
||||||
5. Run `where.exe clang`, then `setx LIBCLANG_PATH "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin"` or something like that
|
5. Run `where.exe clang`, then
|
||||||
|
`setx LIBCLANG_PATH "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin"` or something
|
||||||
|
like that
|
||||||
6. Restart your shell!!!
|
6. Restart your shell!!!
|
||||||
7. Cargo build
|
7. Cargo build
|
||||||
|
|
||||||
|
|
@ -48,7 +56,7 @@ To build on a M1 Mac, make sure to add the following to your project's `.cargo/c
|
||||||
rustflags = "-lc++ -l framework=Accelerate"
|
rustflags = "-lc++ -l framework=Accelerate"
|
||||||
```
|
```
|
||||||
|
|
||||||
See https://github.com/tazz4843/whisper-rs/pull/2 for more information.
|
See https://codeberg.org/tazz4843/whisper-rs/pulls/2 for more information.
|
||||||
|
|
||||||
You also need to have CMake installed. You can obtain this using homebrew:
|
You also need to have CMake installed. You can obtain this using homebrew:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ edition = "2021"
|
||||||
description = "Rust bindings for whisper.cpp"
|
description = "Rust bindings for whisper.cpp"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
documentation = "https://docs.rs/whisper-rs"
|
documentation = "https://docs.rs/whisper-rs"
|
||||||
repository = "https://github.com/tazz4843/whisper-rs"
|
repository = "https://codeberg.org/tazz4843/whisper-rs"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Rust bindings to [whisper.cpp](https://github.com/ggerganov/whisper.cpp/)
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --recursive https://github.com/tazz4843/whisper-rs.git
|
git clone --recursive https://codeberg.org/tazz4843/whisper-rs.git
|
||||||
|
|
||||||
cd whisper-rs
|
cd whisper-rs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
description = "Rust bindings for whisper.cpp (FFI bindings)"
|
description = "Rust bindings for whisper.cpp (FFI bindings)"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
documentation = "https://docs.rs/whisper-rs-sys"
|
documentation = "https://docs.rs/whisper-rs-sys"
|
||||||
repository = "https://github.com/tazz4843/whisper-rs"
|
repository = "https://codeberg.org/tazz4843/whisper-rs"
|
||||||
links = "whisper"
|
links = "whisper"
|
||||||
include = [
|
include = [
|
||||||
"whisper.cpp/bindings/javascript/package-tmpl.json",
|
"whisper.cpp/bindings/javascript/package-tmpl.json",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue