From 9560c85672c32e974027d557b8f2cfd1183cff1c Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 10 Mar 2023 14:13:14 +0000 Subject: [PATCH 1/5] Use taiki-e/install-action for installing cargo-deny --- .github/workflows/dependencies.yml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 14df77370..2c953520a 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -22,12 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install cargo-deny - run: cargo install cargo-deny + - uses: taiki-e/install-action@cargo-deny - name: Check for security advisories and unmaintained crates run: cargo deny check advisories @@ -35,12 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install cargo-deny - run: cargo install cargo-deny + - uses: taiki-e/install-action@cargo-deny - name: Check for banned and duplicated dependencies run: cargo deny check bans @@ -48,12 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install cargo-deny - run: cargo install cargo-deny + - uses: taiki-e/install-action@cargo-deny - name: Check for unauthorized licenses run: cargo deny check licenses @@ -61,11 +46,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install cargo-deny - run: cargo install cargo-deny + - uses: taiki-e/install-action@cargo-deny - name: Checked for unauthorized crate sources run: cargo deny check sources From 98bd99c1ad9c13ec93d8dcdb47cffefbc0b47eda Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 10 Mar 2023 14:22:02 +0000 Subject: [PATCH 2/5] Update CI to use dtolnay/rust-toolchain action --- .github/workflows/ci.yml | 128 +++++++++------------------------------ 1 file changed, 28 insertions(+), 100 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee3bddae0..9247248ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,163 +13,91 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --no-default-features - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --no-default-features + - run: cargo test --no-default-features test-features-default: name: "Test Suite [Features: Default]" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - - uses: actions-rs/cargo@v1 - with: - command: test + - uses: dtolnay/rust-toolchain@stable + - run: cargo build + - run: cargo test test-features-default-with-serde: name: "Test Suite [Features: Default + serde]" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --features serde - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features serde + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --features serde + - run: cargo test --features serde test-features-alloc: name: "Test Suite [Features: alloc]" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --no-default-features --features alloc,grid - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features alloc,grid + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --no-default-features --features alloc,grid + - run: cargo test --no-default-features --features alloc,grid test-features-alloc-no-grid: name: "Test Suite [Features: alloc (no grid)]" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --no-default-features --features alloc - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features alloc + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --no-default-features --features alloc + - run: cargo test --no-default-features --features alloc test-features-default-no-grid: name: "Test Suite [Features: std (no grid)]" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: build - args: --no-default-features --features std - - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features --features std + - uses: dtolnay/rust-toolchain@stable + - run: cargo build --no-default-features --features std + - run: cargo test --no-default-features --features std fmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + components: rustfmt + - run: cargo fmt --all -- --check clippy: name: Clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: nightly - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --workspace -- -D warnings + components: clippy + - run: cargo +nightly clippy --workspace -- -D warnings doc: name: Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: stable - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: doc + components: clippy + - run: cargo doc --workspace -- -D warnings env: RUSTDOCFLAGS: "-D warnings" - markdownlint: name: Markdown Lint runs-on: ubuntu-latest From a10f0c37b3aeba674e6505338b0b8f5772c6b095 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 10 Mar 2023 14:22:21 +0000 Subject: [PATCH 3/5] Enable CI for 0.3.x branch --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9247248ee..d69e11954 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: branches: - main - 0.2.x + - 0.3.x name: Continuous integration From 95021874af9759ff4dbec67783d80016ee2d10a3 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 10 Mar 2023 14:23:26 +0000 Subject: [PATCH 4/5] Fix documentation CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d69e11954..4aa7091e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: with: toolchain: stable components: clippy - - run: cargo doc --workspace -- -D warnings + - run: cargo doc env: RUSTDOCFLAGS: "-D warnings" From cafb8acc1e6fbd6a272b1135e83e0a2f1c9945ab Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 10 Mar 2023 14:26:09 +0000 Subject: [PATCH 5/5] Dummy Cargo.toml change --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e9c079393..f8c1d454d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = [ ] edition = "2021" include = ["src/**/*", "Cargo.toml", "README.md"] -description = "A flexible UI layout library" +description = "A flexible UI layout library " repository = "https://github.com/DioxusLabs/taffy" keywords = ["cross-platform", "layout", "flexbox", "css-grid", "grid"] categories = ["gui"]