Skip to content

Commit

Permalink
Use a cargo workspace to compile the examples efficiently (serenity-r…
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Jun 30, 2020
1 parent 9f848af commit 6b1021f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 24 deletions.
48 changes: 24 additions & 24 deletions azure-build-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,72 @@ jobs:
- bash: |
source $HOME/.cargo/env
cd examples/01_basic_ping_bot
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e01_basic_ping_bot
displayName: 'Build example 1'
- bash: |
source $HOME/.cargo/env
cd examples/02_transparent_guild_sharding
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e02_transparent_guild_sharding
displayName: 'Build example 2'
- bash: |
source $HOME/.cargo/env
cd examples/03_struct_utilities
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e03_struct_utilities
displayName: 'Build example 3'
- bash: |
source $HOME/.cargo/env
cd examples/04_message_builder
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e04_message_builder
displayName: 'Build example 4'
- bash: |
source $HOME/.cargo/env
cd examples/05_command_framework
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e05_command_framework
displayName: 'Build example 5'
- bash: |
source $HOME/.cargo/env
cd examples/06_voice
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e06_voice
displayName: 'Build example 6'
- bash: |
source $HOME/.cargo/env
cd examples/07_sample_bot_structure
CARGO_TARGET_DIR='..' cargo build
cd examples/
cargo build -p e07_sample_bot_structure
displayName: 'Build example 7'
- bash: |
source $HOME/.cargo/env
CARGO_TARGET_DIR='..' cd examples/08_env_logging
cargo build
cd examples/
cargo build -p e08_env_logging
displayName: 'Build example 8'
- bash: |
source $HOME/.cargo/env
CARGO_TARGET_DIR='..' cd examples/09_shard_manager
cargo build
cd examples/
cargo build -p e09_shard_manager
displayName: 'Build example 9'
- bash: |
source $HOME/.cargo/env
CARGO_TARGET_DIR='..' cd examples/10_voice_receive
cargo build
cd examples/
cargo build -p e10_voice_receive
displayName: 'Build example 10'
- bash: |
source $HOME/.cargo/env
CARGO_TARGET_DIR='..' cd examples/11_crate_message_builder
cargo build
cd examples/
cargo build -p e11_create_message_builder
displayName: 'Build example 11'
- bash: |
source $HOME/.cargo/env
CARGO_TARGET_DIR='..' cd examples/12_timing_and_events
cargo build
cd examples/
cargo build -p e12_timing_and_events
displayName: 'Build example 12'
15 changes: 15 additions & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[workspace]
members = [
"e01_basic_ping_bot",
"e02_transparent_guild_sharding",
"e03_struct_utilities",
"e04_message_builder",
"e05_command_framework",
"e06_voice",
"e07_sample_bot_structure",
"e08_env_logging",
"e09_shard_manager",
"e10_voice_receive",
"e11_create_message_builder",
"e12_timing_and_events",
]

0 comments on commit 6b1021f

Please sign in to comment.