chore: adjust docs and READMEs #11
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: | |
| branches: ["main"] | |
| paths: | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/ci.yml" | |
| pull_request: | |
| paths: | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/ci.yml" | |
| merge_group: | |
| paths: | |
| - "crates/**" | |
| - "Cargo.toml" | |
| - "Cargo.lock" | |
| - ".github/workflows/ci.yml" | |
| permissions: | |
| contents: read | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| RUST_BACKTRACE: full | |
| jobs: | |
| test: | |
| name: Test (Rust ${{matrix.toolchain}}, target ${{matrix.target}}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| toolchain: ["nightly", "beta", "stable", "1.83.0"] | |
| target: ["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl"] | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{matrix.toolchain}} | |
| components: llvm-tools, clippy, rust-src | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just,cargo-llvm-cov,cargo-nextest | |
| - name: Enable type layout randomization | |
| if: matrix.toolchain == 'nightly' | |
| run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV | |
| - run: sudo apt-get update && sudo apt-get install -y musl-tools | |
| if: endsWith(matrix.target, 'musl') | |
| - run: rustup target add ${{matrix.target}} | |
| - run: just ci-test --target ${{matrix.target}} | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: dtolnay/install@cargo-docs-rs | |
| - run: cargo docs-rs --package ktls-core | |
| - run: cargo docs-rs --package ktls-stream | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.83.0 | |
| components: clippy | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just | |
| - run: just clippy --all | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| components: llvm-tools, clippy, rust-src | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just,cargo-llvm-cov,cargo-nextest | |
| - run: just ci-test | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: hanyu-dev/ktls |