feat: Support smallvec
from ShrinkToFit
#161
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: | |
pull_request: | |
types: ["opened", "reopened", "synchronize"] | |
push: | |
branches: | |
- main | |
env: | |
CI: 1 | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: "always" | |
DIFF: 0 | |
# For faster CI | |
RUST_LOG: "off" | |
jobs: | |
cargo-fmt: | |
name: Cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# We explicitly do this to cache properly. | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
cargo-clippy: | |
name: Cargo clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
components: clippy | |
- run: cargo clippy --all --all-targets -- -D warnings | |
cargo-deny: | |
name: Check license of dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
cargo-check: | |
name: Check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# We explicitly do this to cache properly. | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Run cargo check for all targets | |
run: cargo check --all --all-targets | |
cargo-test: | |
name: Cargo test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Handle line endings | |
shell: bash | |
if: runner.os == 'Windows' | |
run: | | |
git config --system core.autocrlf false | |
git config --system core.eol lf | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
# We explicitly do this to cache properly. | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Run cargo test | |
run: | | |
cargo test --all | |
done: | |
needs: | |
- cargo-fmt | |
- cargo-clippy | |
- cargo-deny | |
- cargo-check | |
- cargo-test | |
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
name: Done | |
steps: | |
- run: exit 1 | |
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} | |
cargo-publish: | |
name: "Publish" | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: | |
- done | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
- name: Install cargo-edit | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- name: Install cargo-mono | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- name: Publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: | | |
cargo mono publish --no-verify |