added registry #12
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: Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Disable incremental compilation. | |
| # | |
| # Incremental compilation is useful as part of an edit-build-test-edit cycle, | |
| # as it lets the compiler avoid recompiling code that hasn't changed. However, | |
| # on CI, we're not making small edits; we're almost always building the entire | |
| # project from scratch. Thus, incremental compilation on CI actually | |
| # introduces *additional* overhead to support making future builds | |
| # faster...but no future builds will ever occur in any given CI environment. | |
| # | |
| # See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow | |
| # for details. | |
| CARGO_INCREMENTAL: 0 | |
| # Allow more retries for network requests in cargo (downloading crates) and | |
| # rustup (installing toolchains). This should help to reduce flaky CI failures | |
| # from transient network timeouts or other issues. | |
| CARGO_NET_RETRY: 10 | |
| RUSTUP_MAX_RETRIES: 10 | |
| # Don't emit giant backtraces in the CI logs. | |
| RUST_BACKTRACE: short | |
| jobs: | |
| license-check: | |
| name: license-check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3 | |
| - name: Install correct Rust toolchain | |
| run: rustup update && rustup toolchain install | |
| - run: scripts/license_check.sh | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-ghcloud] | |
| feature: [weather-example, twitter-example, seal-example] | |
| fail-fast: false | |
| env: | |
| RUSTFLAGS: -D warnings | |
| steps: | |
| - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3 | |
| - name: Install correct Rust toolchain | |
| run: rustup update && rustup toolchain install | |
| - uses: taiki-e/install-action@d30f7ecb94d4d882276efb3967be14b8ef34d289 # pin@nextest | |
| - name: cargo test (${{ matrix.feature }}) | |
| working-directory: src/nautilus-server | |
| run: cargo test --no-default-features --features ${{ matrix.feature }} | |
| - name: Doctests (${{ matrix.feature }}) | |
| working-directory: src/nautilus-server | |
| run: cargo test --doc --no-default-features --features ${{ matrix.feature }} | |
| # Ensure there are no uncommitted changes after tests | |
| - run: scripts/changed-files.sh | |
| clippy: | |
| name: cargo clippy (${{ matrix.feature }}) | |
| runs-on: ubuntu-ghcloud | |
| strategy: | |
| matrix: | |
| feature: [weather-example, twitter-example, seal-example] | |
| steps: | |
| - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3 | |
| - name: Install correct Rust toolchain | |
| run: rustup update && rustup toolchain install | |
| # See '.cargo/config' for list of enabled/disabled clippy lints | |
| - name: cargo clippy (${{ matrix.feature }}) | |
| working-directory: src/nautilus-server | |
| run: cargo clippy --no-default-features --features ${{ matrix.feature }} -- -D warnings | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3 | |
| - name: Install correct Rust toolchain | |
| run: rustup update && rustup toolchain install | |
| - name: rustfmt | |
| working-directory: src/nautilus-server | |
| run: cargo fmt --all -- --check | |
| cargo-deny: | |
| name: cargo-deny (advisories, licenses, bans, ...) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: EmbarkStudios/cargo-deny-action@76cd80eb775d7bbbd2d80292136d74d39e1b4918 # pin@v2.0.14 | |
| with: | |
| command: check | |
| arguments: --all-features | |
| manifest-path: src/nautilus-server/Cargo.toml | |
| log-level: warn | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| RUSTUP_MAX_RETRIES: 10 | |
| RUST_BACKTRACE: full |