Skip to content

Commit

Permalink
fix cargo llvm cov
Browse files Browse the repository at this point in the history
fix cargo llvm cov

fix cargo llvm cov
  • Loading branch information
tsirysndr committed Aug 25, 2024
1 parent 9384b81 commit 8d0b5f5
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 3 deletions.
16 changes: 15 additions & 1 deletion .fluentci/src/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,26 @@ export const test = async (src = ".") => {
.withExec(["cargo", "install", "--path", "."])
.withExec(["sh", "-c", "rm -rf target/*"])
.withExec(["music-player", "scan"])
.withExec([
"rm",
"-rf",
"addons/chromecast",
"addons/dlna",
"addons/kodi",
"addons/local",
"addons/mopidy",
"addons/mpd",
"addons/mpris",
"addons/squeezebox",
"addons/tunein",
])
.withExec(["cp", "Cargo.llvm-cov.toml", "Cargo.toml"])
.withExec([
"sh",
"-c",
"music-player & \
sleep 3 && \
cargo llvm-cov --ignore-filename-regex addons --all-features --lib --workspace --lcov --output-path lcov.info && \
cargo llvm-cov --all-features --lib --workspace --lcov --output-path lcov.info && \
killall -s TERM music-player",
]);

Expand Down
137 changes: 137 additions & 0 deletions Cargo.llvm-cov.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
[package]
authors = ["Tsiry Sandratraina <[email protected]>"]
categories = ["command-line-utilities"]
description = "An extensible music player daemon written in Rust"
edition = "2021"
keywords = ["tokio", "music", "daemon", "streaming", "player"]
license = "MIT"
name = "music-player"
readme = "README.md"
repository = "https://github.com/tsirysndr/music-player"
version = "0.2.0-alpha.13"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace]

members = [
"addons",
"audio",
"client",
"discovery",
"entity",
"graphql",
"migration",
"playback",
"scanner",
"server",
"settings",
"storage",
"tracklist",
"types",
"webui",
"webui/musicplayer/src-tauri",
"common/",
"pdk",
"common",
"host_fn",
]

[[bin]]
name = "music-player"
path = "src/main.rs"

[dependencies.music-player-server]
path = "server"
version = "0.2.0"

[dependencies.music-player-playback]
path = "playback"
version = "0.1.13"

[dependencies.music-player-scanner]
path = "scanner"
version = "0.1.9"

[dependencies.music-player-entity]
path = "entity"
version = "0.1.7"

[dependencies.music-player-migration]
path = "migration"
version = "0.1.9"

[dependencies.music-player-settings]
path = "settings"
version = "0.1.5"

[dependencies.music-player-storage]
path = "storage"
version = "0.1.8"

[dependencies.music-player-addons]
path = "addons"
version = "0.1.5"

[dependencies.music-player-tracklist]
path = "tracklist"
version = "0.1.8"

[dependencies.music-player-client]
path = "client"
version = "0.1.5"

[dependencies.music-player-webui]
path = "webui"
version = "0.1.15"

[dependencies.music-player-discovery]
path = "discovery"
version = "0.1.3"

[dependencies.music-player-graphql]
path = "graphql"
version = "0.1.10"

[dependencies.music-player-types]
path = "types"
version = "0.1.6"

[dependencies.music-player-audio]
path = "audio"
version = "0.1.6"

[dependencies.sea-orm-migration]
features = [
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
# e.g.
# "runtime-tokio-rustls", # `ASYNC_RUNTIME` feature
# "sqlx-postgres", # `DATABASE_DRIVER` feature
"runtime-tokio-rustls",
"sqlx-sqlite",
]
version = "^0.9.0"

[dependencies]
anyhow = "1.0.67"
clap = "4.5.16"
crossterm = {version = "0.25.0", features = ["serde"]}
dirs = "4.0.0"
extism = "1.5.0"
futures = "0.3.24"
futures-channel = "0.3.24"
lofty = "0.9.0"
md5 = "0.7.0"
music-player-host-fn = {path = "host_fn", version = "0.1.0"}
owo-colors = "3.5.0"
reqwest = {version = "0.12.7", features = ["rustls-tls", "blocking"], default-features = false}
sea-orm = {version = "0.9.2", features = ["runtime-tokio-rustls", "sqlx-sqlite"]}
serde_json = "1.0.85"
spinners = "4.1.0"
tabled = "0.8.0"
time = "0.3.36"
tokio = {version = "1.21.0", features = ["full"]}
tui = {version = "0.19.0", features = ["crossterm", "serde"]}
tungstenite = "0.17.3"
ureq = "2.10.1"
7 changes: 7 additions & 0 deletions addons/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ pub fn load_plugin(module: &str, user_data: &UserData<State>) -> Result<Plugin,
.with_function("get_settings", [], [PTR], user_data.clone(), get_settings)
.with_function("get_addons", [], [PTR], user_data.clone(), get_addons)
.with_function("call", [PTR], [], user_data.clone(), call)
.with_function(
"get_current_track",
[],
[PTR],
user_data.clone(),
get_current_track,
)
.build()?;
Ok(plugin)
}
4 changes: 2 additions & 2 deletions pdk/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extern "ExtismHost" {
fn load_tracklist(tracks: Json<Vec<Track>>);
fn play_next();
fn load(track: Json<Track>);
fn get_current_playback();
fn get_current_track();
fn get_current_tracklist() -> Json<Tracklist>;
fn play_track_at(index: u32);
fn remove_track_at(index: u32);
Expand Down Expand Up @@ -85,7 +85,7 @@ impl Player {
}

pub fn get_current_playback(&self) -> Result<(), Error> {
unsafe { get_current_playback() }
unsafe { get_current_track() }
}

pub fn get_current_tracklist(&self) -> Result<Json<Tracklist>, Error> {
Expand Down

0 comments on commit 8d0b5f5

Please sign in to comment.