Skip to content

CI

CI #1185

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, reopened, synchronize]
schedule:
- cron: '0 0 * * *' # every day at midnight
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
steps:
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Use the cache to share dependencies # keyed by Cargo.lock
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo2-
- name: Checkout sources
uses: actions/checkout@v2
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
- name: Run ignored tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose -- --ignored
test-core-serde-features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
feature: [ser_id_8, ser_id_16, ser_id_32]
steps:
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Use the cache to share dependencies # keyed by Cargo.lock
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo2-
- name: Checkout sources
uses: actions/checkout@v2
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=core/Cargo.toml --no-default-features --features ${{ matrix.feature }}
- name: Run ignored tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=core/Cargo.toml --no-default-features --features ${{ matrix.feature }} -- --ignored
test-core-misc-features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
feature: [thread_pinning, low_latency, type_erasure]
steps:
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Use the cache to share dependencies # keyed by Cargo.lock
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo2-
- name: Checkout sources
uses: actions/checkout@v2
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=core/Cargo.toml --features ${{ matrix.feature }}
- name: Run ignored tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=core/Cargo.toml --features ${{ matrix.feature }} -- --ignored
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-02-14
override: true
components: rustfmt, clippy
- name: Use the cache to share dependencies # keyed by Cargo.lock
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo2-
- name: Checkout sources
uses: actions/checkout@v2
- name: Run cargo clippy (default)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
- name: Run cargo clippy (ser_id_8)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=core/Cargo.toml --all-targets --no-default-features --features ser_id_8 -- -D warnings
- name: Run cargo clippy (thread_pinning)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=core/Cargo.toml --all-targets --features thread_pinning -- -D warnings
- name: Run cargo clippy (low_latency)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=core/Cargo.toml --all-targets --features low_latency -- -D warnings
- name: Run cargo clippy (type_erasure)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path=core/Cargo.toml --all-targets --features type_erasure -- -D warnings
format:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-02-14
override: true
components: rustfmt, clippy
- name: Use the cache to share dependencies # keyed by Cargo.lock
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo2-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo2-
- name: Checkout sources
uses: actions/checkout@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check