From b99d67a742bc32d16307109c7ce30384d2118c77 Mon Sep 17 00:00:00 2001 From: Tim Vilgot Mikael Fredenberg Date: Wed, 15 Feb 2023 11:34:49 +0100 Subject: [PATCH 1/5] ci: inline min-vers into MSRV --- .github/workflows/check.yml | 39 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 93d9a21f154..4f72f3af0b6 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,6 +24,10 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 + # Necessary for minimal-versions + - name: Install nightly toolchain + uses: dtolnay/rust-toolchain@nightly + - name: Retrieve rust-version run: echo rust-version=$(awk '/rust-version/{print $NF}' Cargo.toml | tr -d '"') >> $GITHUB_ENV @@ -41,7 +45,13 @@ jobs: - name: Add problem matchers run: echo "::add-matcher::.github/rust.json" - - run: cargo check --all-features --all-targets + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + + - name: Install cargo-minimal-versions + uses: taiki-e/install-action@cargo-minimal-versions + + - run: cargo minimal-versions check --all-features --all-targets # Check documentation build-docs: @@ -120,33 +130,6 @@ jobs: - name: Check code formatting run: cargo fmt --all -- --check --unstable-features --config format_code_in_doc_comments=true - min-vers: - name: Minimal crate versions - needs: [MSRV] - runs-on: ubuntu-latest - - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install nightly toolchain - uses: dtolnay/rust-toolchain@nightly - - - name: Cache dependencies - uses: Swatinem/rust-cache@v2 - - - name: Add problem matchers - run: echo "::add-matcher::.github/rust.json" - - - name: Install cargo-hack - uses: taiki-e/install-action@cargo-hack - - - name: Install cargo-minimal-versions - uses: taiki-e/install-action@cargo-minimal-versions - - - name: Check minimal versions - run: cargo minimal-versions check - # Tests test: name: Test From 532ee791e713c303c24c694db2ff651d7c313425 Mon Sep 17 00:00:00 2001 From: Tim Vilgot Mikael Fredenberg Date: Wed, 15 Feb 2023 11:35:08 +0100 Subject: [PATCH 2/5] ci: exclude book from doctests --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4f72f3af0b6..c034abdb9b6 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -156,7 +156,7 @@ jobs: run: cargo nextest --config-file ${{ github.workspace }}/nextest.toml run --profile ci --workspace --exclude book - name: Run doctests - run: cargo test --doc + run: cargo test --doc --workspace --exclude book feature-combinations: name: Feature combinations From 9918300f59f9f1204ed33358947945b8eed7aca4 Mon Sep 17 00:00:00 2001 From: Tim Vilgot Mikael Fredenberg Date: Wed, 15 Feb 2023 11:56:55 +0100 Subject: [PATCH 3/5] cache: bump bitflags --- twilight-cache-inmemory/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twilight-cache-inmemory/Cargo.toml b/twilight-cache-inmemory/Cargo.toml index 2fd2d4c1bed..ac69486a099 100644 --- a/twilight-cache-inmemory/Cargo.toml +++ b/twilight-cache-inmemory/Cargo.toml @@ -14,7 +14,7 @@ rust-version.workspace = true version = "0.15.0" [dependencies] -bitflags = { default-features = false, version = "1" } +bitflags = { default-features = false, version = "1.3" } dashmap = { default-features = false, version = "5.3" } serde = { default-features = false, features = ["derive"], version = "1" } twilight-model = { default-features = false, path = "../twilight-model", version = "0.15.0" } From aef844d62a731ac8295d94eebf52b97b11956220 Mon Sep 17 00:00:00 2001 From: Tim Vilgot Mikael Fredenberg Date: Wed, 15 Feb 2023 12:01:39 +0100 Subject: [PATCH 4/5] ci: msrv don't check all targets --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c034abdb9b6..80c6013f736 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -51,7 +51,7 @@ jobs: - name: Install cargo-minimal-versions uses: taiki-e/install-action@cargo-minimal-versions - - run: cargo minimal-versions check --all-features --all-targets + - run: cargo minimal-versions check --all-features # Check documentation build-docs: From 982c77a4aab1f0320be7a3fd94652183dba67316 Mon Sep 17 00:00:00 2001 From: Tim Vilgot Mikael Fredenberg Date: Wed, 15 Feb 2023 12:26:07 +0100 Subject: [PATCH 5/5] revert impossible changes --- .github/workflows/check.yml | 39 +++++++++++++++++++++--------- twilight-cache-inmemory/Cargo.toml | 2 +- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 80c6013f736..44871237016 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -24,10 +24,6 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 - # Necessary for minimal-versions - - name: Install nightly toolchain - uses: dtolnay/rust-toolchain@nightly - - name: Retrieve rust-version run: echo rust-version=$(awk '/rust-version/{print $NF}' Cargo.toml | tr -d '"') >> $GITHUB_ENV @@ -45,13 +41,7 @@ jobs: - name: Add problem matchers run: echo "::add-matcher::.github/rust.json" - - name: Install cargo-hack - uses: taiki-e/install-action@cargo-hack - - - name: Install cargo-minimal-versions - uses: taiki-e/install-action@cargo-minimal-versions - - - run: cargo minimal-versions check --all-features + - run: cargo check --all-features --all-targets # Check documentation build-docs: @@ -130,6 +120,33 @@ jobs: - name: Check code formatting run: cargo fmt --all -- --check --unstable-features --config format_code_in_doc_comments=true + min-vers: + name: Minimal crate versions + needs: [MSRV] + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install nightly toolchain + uses: dtolnay/rust-toolchain@nightly + + - name: Cache dependencies + uses: Swatinem/rust-cache@v2 + + - name: Add problem matchers + run: echo "::add-matcher::.github/rust.json" + + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + + - name: Install cargo-minimal-versions + uses: taiki-e/install-action@cargo-minimal-versions + + - name: Check minimal versions + run: cargo minimal-versions check + # Tests test: name: Test diff --git a/twilight-cache-inmemory/Cargo.toml b/twilight-cache-inmemory/Cargo.toml index ac69486a099..2fd2d4c1bed 100644 --- a/twilight-cache-inmemory/Cargo.toml +++ b/twilight-cache-inmemory/Cargo.toml @@ -14,7 +14,7 @@ rust-version.workspace = true version = "0.15.0" [dependencies] -bitflags = { default-features = false, version = "1.3" } +bitflags = { default-features = false, version = "1" } dashmap = { default-features = false, version = "5.3" } serde = { default-features = false, features = ["derive"], version = "1" } twilight-model = { default-features = false, path = "../twilight-model", version = "0.15.0" }