Compare commits

...

5 Commits

Author SHA1 Message Date
Nolan Darilek 1df00952e4 Update repositories and remove Gitlab CI configuration.
continuous-integration/drone/push Build is passing Details
2022-11-22 14:07:10 -06:00
Nolan Darilek db43d95cf7 Fix indentation.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2022-11-22 13:59:51 -06:00
Nolan Darilek 89fcced31e Update CI build configuration. 2022-11-22 13:55:55 -06:00
Nolan Darilek 1c11f279ec Bump version and use correct features in docs.rs builds. 2022-11-22 13:52:19 -06:00
Nolan Darilek f854e386a6 Re-add support for speech-dispatcher 0.9. 2022-11-22 13:49:54 -06:00
5 changed files with 18 additions and 38 deletions

View File

@ -9,17 +9,17 @@ steps:
- rustup component add clippy rustfmt
- apt-get update -qq
- apt-get install -qqy llvm-dev libclang-dev clang libspeechd-dev
- cargo fmt --check
- cargo test
- cargo clippy
- cargo fmt --all --check
- cargo test --no-default-features --features 0_10
- cargo clippy --no-default-features --features 0_10
- name: release
image: rust
commands:
- apt-get update -qq
- apt-get install -qqy llvm-dev libclang-dev clang libspeechd-dev
- cargo publish --manifest-path speech-dispatcher-sys/Cargo.toml || true
- cargo publish --manifest-path speech-dispatcher/Cargo.toml
when:
- cargo publish --no-default-features --features 0_10 --manifest-path speech-dispatcher-sys/Cargo.toml || true
- cargo publish --no-default-features --features 0_10 --manifest-path speech-dispatcher/Cargo.toml
when:
ref:
- refs/tags/v*
environment:

View File

@ -1,23 +0,0 @@
image: rust
stages:
- test
- publish
before_script:
- apt-get update
- apt-get install -y libspeechd-dev llvm-dev libclang-dev clang
test:
stage: test
script:
- cargo test --no-default-features --features 0_10
publish:
stage: publish
script:
- cargo login $CARGO_TOKEN
- cargo publish --no-default-features --features 0_10 --manifest-path speech-dispatcher-sys/Cargo.toml || true
- cargo publish --no-default-features --features 0_10 --manifest-path speech-dispatcher/Cargo.toml
only:
- tags

View File

@ -2,7 +2,7 @@
name = "speech-dispatcher-sys"
version = "0.7.0"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://gitlab.com/ndarilek/speech-dispatcher-rs"
repository = "https://dev.thewordnerd.info/nolan/speech-dispatcher-rs"
description = "speech-dispatcher system bindings"
license = "LGPL-2.1 OR MIT OR Apache-2.0"
edition = "2021"

View File

@ -1,8 +1,8 @@
[package]
name = "speech-dispatcher"
version = "0.15.1"
version = "0.16.0"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://gitlab.com/ndarilek/speech-dispatcher-rs"
repository = "https://dev.thewordnerd.info/nolan/speech-dispatcher-rs"
description = "Rusty interface to the speech-dispatcher speech synthesis library"
license = "LGPL-2.1 OR MIT OR Apache-2.0"
edition = "2021"
@ -10,6 +10,7 @@ edition = "2021"
[features]
0_11 = ["0_10"]
0_10 = []
0_9 = []
default = ["0_11"]
[dependencies]
@ -19,6 +20,7 @@ libc = "0.2.125"
[package.metadata.docs.rs]
no-default-features = true
features = ["0_9"]
[package.metadata.release]
tag-prefix = ""

View File

@ -99,6 +99,7 @@ pub enum Notification {
#[repr(u32)]
pub enum Punctuation {
All = SPDPunctuation::SPD_PUNCT_ALL,
#[cfg(feature = "0_10")]
Most = SPDPunctuation::SPD_PUNCT_MOST,
Some = SPDPunctuation::SPD_PUNCT_SOME,
None = SPDPunctuation::SPD_PUNCT_NONE,
@ -413,25 +414,25 @@ impl Connection {
}
pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error> {
#[cfg(all(feature = "0_10", not(feature = "0_11")))]
#[cfg(all(any(feature = "0_9", feature = "0_10"), not(feature = "0_11")))]
let v = unsafe { spd_set_voice_type(*self.0, voice_type as u32) };
#[cfg(any(feature = "0_11", not(feature = "0_10")))]
#[cfg(all(not(feature = "0_9"), any(feature = "0_11", not(feature = "0_10"))))]
let v = unsafe { spd_set_voice_type(*self.0, voice_type as i32) };
c_int_to_result(v)
}
pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error> {
#[cfg(all(feature = "0_10", not(feature = "0_11")))]
#[cfg(all(any(feature = "0_9", feature = "0_10"), not(feature = "0_11")))]
let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as u32) };
#[cfg(any(feature = "0_11", not(feature = "0_10")))]
#[cfg(all(not(feature = "0_9"), any(feature = "0_11", not(feature = "0_10"))))]
let v = unsafe { spd_set_voice_type_all(*self.0, voice_type as i32) };
c_int_to_result(v)
}
pub fn set_voice_type_uid(&self, voice_type: VoiceType, target_uid: u32) -> Result<(), Error> {
#[cfg(all(feature = "0_10", not(feature = "0_11")))]
#[cfg(all(any(feature = "0_9", feature = "0_10"), not(feature = "0_11")))]
let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as u32, target_uid) };
#[cfg(any(feature = "0_11", not(feature = "0_10")))]
#[cfg(all(not(feature = "0_9"), any(feature = "0_11", not(feature = "0_10"))))]
let v = unsafe { spd_set_voice_type_uid(*self.0, voice_type as i32, target_uid) };
c_int_to_result(v)
}