⚡️ core: Allow service to return borrowed data from call #570
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: Lint, Build and Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| MSRV: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| [ | |
| x86_64-unknown-linux-gnu, | |
| x86_64-apple-darwin, | |
| x86_64-unknown-freebsd, | |
| x86_64-unknown-netbsd, | |
| ] | |
| env: | |
| RUSTFLAGS: -D warnings | |
| MSRV: 1.83.0 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.MSRV }} | |
| targets: ${{ matrix.TARGET }} | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check build with MSRV | |
| run: | | |
| cargo --locked check --all-features --target ${{ matrix.TARGET }} | |
| fmt: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: -D warnings | |
| RUST_BACKTRACE: full | |
| RUST_LOG: trace | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| # We use some nightly fmt options. | |
| toolchain: nightly | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: | | |
| cargo --locked fmt -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| [ | |
| x86_64-unknown-linux-gnu, | |
| x86_64-apple-darwin, | |
| x86_64-unknown-freebsd, | |
| x86_64-unknown-netbsd, | |
| ] | |
| env: | |
| RUSTFLAGS: -D warnings | |
| RUST_BACKTRACE: full | |
| RUST_LOG: trace | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| targets: x86_64-apple-darwin, x86_64-unknown-freebsd, x86_64-unknown-netbsd | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Catch common mistakes and unwrap calls | |
| run: | | |
| cargo --locked clippy --target ${{ matrix.target }} -- -D warnings | |
| linux_test: | |
| runs-on: ubuntu-latest | |
| needs: [fmt, clippy] | |
| env: | |
| RUSTFLAGS: -D warnings | |
| RUST_BACKTRACE: full | |
| RUST_LOG: trace | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build and Test | |
| run: | | |
| cargo test --release --all-features | |
| cargo test -p zlink-core --release --no-default-features --features idl-parse,proxy,defmt | |
| # Test the smol support | |
| cargo test -p zlink --release --no-default-features --features tracing,smol,proxy,introspection,idl-parse,server | |
| doc_build: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check documentation build | |
| run: cargo --locked doc --all-features | |
| semver-checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Check semver | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 |