Split core functionality into a serenity-core
subcrate
#6385
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
rust_min: 1.88.0 | |
rust_nightly: nightly-2025-06-25 | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- stable | |
- beta | |
- nightly | |
- Windows | |
- macOS | |
- native-tls | |
- no default features | |
- no cache | |
- no gateway | |
- chrono | |
- zlib compression | |
- zstd compression | |
- zlib and zstd compression | |
include: | |
- name: beta | |
toolchain: beta | |
- name: nightly | |
toolchain: nightly | |
- name: Windows | |
os: windows-latest | |
- name: macOS | |
os: macos-latest | |
- name: native-tls | |
features: default_native_tls | |
- name: no default features | |
features: " " | |
- name: no cache | |
features: framework rustls_backend | |
- name: no gateway | |
features: model rustls_backend | |
- name: chrono | |
features: chrono | |
- name: zlib compression | |
features: default transport_compression_zlib | |
- name: zstd compression | |
features: default transport_compression_zstd | |
- name: zlib and zstd compression | |
features: default transport_compression_zlib transport_compression_zstd | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ | |
(matrix.toolchain == 'nightly' && env.rust_nightly) | |
|| matrix.toolchain | |
|| 'stable' | |
}} | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test --no-default-features --features "${{ matrix.features || 'full' }}" | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- builder without model | |
- unstable + typesize | |
- unstable (no default features) | |
- temp cache | |
- temp cache + typesize | |
include: | |
- name: builder without model | |
features: builder | |
- name: unstable + typesize | |
features: default unstable typesize | |
- name: unstable (no default features) | |
features: unstable | |
- name: temp cache | |
features: default temp_cache | |
- name: temp cache + typesize | |
features: default temp_cache typesize | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run checks | |
run: cargo check --no-default-features --features "${{ matrix.features || 'full' }}" | |
MSRV: | |
runs-on: ubuntu-latest | |
# We only run this job on the current branch as keeping MSRV the same is not important on next. | |
if: (github.event_name == 'push' && github.ref_name == 'current') || | |
(github.event_name == 'pull_request' && github.base_ref == 'current') | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain (${{ env.rust_min }}) | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.rust_min }} | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run checks | |
run: cargo check --features full | |
min_versions: | |
name: Check minimal versions | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain (${{ env.rust_nightly }}) | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.rust_nightly }} | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Check minimal versions | |
run: | | |
cargo update -Z minimal-versions | |
cargo check | |
doc: | |
name: Build docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build docs | |
run: | | |
cargo doc --no-deps --features full,unstable | |
examples: | |
name: Examples | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Add problem matchers | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: 'Check example 1' | |
run: cargo check -p e01_basic_ping_bot | |
- name: 'Check example 2' | |
run: cargo check -p e02_transparent_guild_sharding | |
- name: 'Check example 3' | |
run: cargo check -p e03_struct_utilities | |
- name: 'Check example 4' | |
run: cargo check -p e04_message_builder | |
- name: 'Check example 5' | |
run: cargo check -p e05_sample_bot_structure | |
- name: 'Check example 6' | |
run: cargo check -p e06_env_logging | |
- name: 'Check example 7' | |
run: cargo check -p e07_shard_manager | |
- name: 'Check example 8' | |
run: cargo check -p e08_create_message_builder | |
- name: 'Check example 09' | |
run: cargo check -p e09_collectors | |
- name: 'Check example 10' | |
run: cargo check -p e10_gateway_intents | |
- name: 'Check example 11' | |
run: cargo check -p e11_global_data | |
- name: 'Check example 12' | |
run: cargo check -p e12_parallel_loops | |
- name: 'Check example 13' | |
run: cargo check -p e13_sqlite_database | |
- name: 'Check example 14' | |
run: cargo check -p e14_message_components | |
- name: 'Check example 15' | |
run: cargo check -p e15_webhook | |
- name: 'Check example 16' | |
run: cargo check -p e16_interactions_endpoint | |
- name: 'Check testing example' | |
run: cargo check -p testing |