From 20ea1231bb3e68def71f26934cf353db1ee00cdd Mon Sep 17 00:00:00 2001 From: rhysd Date: Sun, 1 Dec 2024 17:17:24 +0900 Subject: [PATCH] tmp --- .github/workflows/ci.yml | 73 +++------------------------------------- 1 file changed, 5 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e183cef..226df7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,75 +4,12 @@ env: CARGO_TERM_COLOR: always jobs: - unit-test: - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - fail-fast: true - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - name: Run tests on Linux or macOS - run: | - cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,termion,serde,arbitrary - cargo llvm-cov --color always --no-run - if: ${{ matrix.os != 'windows-latest' }} - - name: Run tests on Windows - run: | - cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,serde,arbitrary - cargo llvm-cov --color always --no-run - if: ${{ matrix.os == 'windows-latest' }} - - run: cargo test --no-default-features --features=tuirs-crossterm,search -- --skip .rs - - run: cargo test --no-default-features --features=tuirs-termion,search -- --skip .rs - if: ${{ matrix.os != 'windows-latest' }} - - run: cargo test --no-default-features --features=no-backend,search -- --skip .rs - - run: cargo test --no-default-features --features=tuirs-no-backend,search -- --skip .rs - - uses: codecov/codecov-action@v4 - with: - files: lcov.info - token: ${{ secrets.CODECOV_TOKEN }} - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: clippy,rustfmt - - uses: Swatinem/rust-cache@v2 - - run: cargo fmt -- --check - - run: cargo clippy --examples --tests -- -D warnings - - run: cargo clippy --examples --tests --features search,serde -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features termion -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features termion,search -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features termwiz -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features termwiz,search -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features no-backend -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features no-backend,search -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features tuirs-crossterm -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features tuirs-crossterm,search -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features tuirs-termion -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features tuirs-termion,search -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend -- -D warnings - - run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend,search -- -D warnings - - run: cargo rustdoc --features=search,termwiz,termion,serde -p tui-textarea -- -D warnings cargo-doc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - name: Run `cargo doc` with same configuration as docs.rs - run: | - set -e - md="$(cargo metadata --format-version=1 | jq '.packages[] | select(.name=="tui-textarea") | .metadata.docs.rs')" - export RUSTDOCFLAGS="$(echo "$md" | jq -r '.["rustdoc-args"] | join(" ")') -D warnings" - features="$(echo "$md" | jq -r '.features | join(",")')" - set -x - for target in $(echo "$md" | jq -r '.targets | join(" ")') - do - rustup target add "$target" - cargo doc -p tui-textarea "--features=$features" "--target=$target" - done + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2024-11-30 + - run: rustup target add x86_64-unknown-linux-gnu + - run: RUSTDOCFLAGS='--cfg docsrs -D warnings' cargo doc --target=x86_64-unknown-linux-gnu