mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[CI] Improvement and fixes (#161)
* protocols: Fix building without the "games" feature * crate/lib: Add required features for examples This prevents cargo from running the examples if the required features aren't enabled. * ci: Run if ANY Cargo.toml files are changed * ci: Make sure to run unit tests * ci: Separate checks for library and CLI * ci: Add slightly better comments * ci: Only run deeper tests for CLI or LIB when their files were changed * ci: Improve act arguments for testing actions locally * ci: Fix pre-commit not running tests * ci: Only update shared cache after the initial build * ci: Make sure that rustup downloads get cached * tidy: Clean up file formatting * ci: Fix issue with audit
This commit is contained in:
parent
0c7dbe76d7
commit
b3a29b15b1
7 changed files with 123 additions and 15 deletions
|
|
@ -32,4 +32,21 @@ encoding_rs = "0.8"
|
|||
|
||||
serde = { version = "1.0", optional = true }
|
||||
|
||||
phf = { version = "0.11", optional = true, features = ["macros"] }
|
||||
phf = { version = "0.11", optional = true, features = ["macros"] }
|
||||
|
||||
# Examples
|
||||
[[example]]
|
||||
name = "minecraft"
|
||||
required-features = ["games"]
|
||||
|
||||
[[example]]
|
||||
name = "teamfortress2"
|
||||
required-features = ["games"]
|
||||
|
||||
[[example]]
|
||||
name = "valve_master_server_query"
|
||||
required-features = ["services"]
|
||||
|
||||
[[example]]
|
||||
name = "generic"
|
||||
required-features = ["games", "game_defs"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#[cfg(feature = "games")]
|
||||
use crate::games::minecraft;
|
||||
use crate::protocols::{gamespy, quake, unreal2, valve};
|
||||
use crate::GDErrorKind::InvalidInput;
|
||||
use crate::{minecraft, GDResult};
|
||||
use crate::GDResult;
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
|
|
@ -8,6 +10,7 @@ use std::time::Duration;
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Enumeration of all custom protocols
|
||||
#[cfg(feature = "games")]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub enum ProprietaryProtocol {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue