From fa4d8b834892dde62c48b65930fa6655c728b020 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:57:57 +0000 Subject: [PATCH 1/7] Bump Swatinem/rust-cache from 2.2.0 to 2.2.1 Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/Swatinem/rust-cache/compare/v2.2.0...v2.2.1) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/uffizzi-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 934d91522..922a8b533 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -23,7 +23,7 @@ jobs: target: x86_64-unknown-linux-musl - name: Cache dependencies - uses: Swatinem/rust-cache@v2.2.0 + uses: Swatinem/rust-cache@v2.2.1 - name: Run cargo check without any default features uses: actions-rs/cargo@v1 From 3a0314f9deb6b683c9b680b3462fd89b112ed447 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:58:05 +0000 Subject: [PATCH 2/7] Bump svenstaro/upload-release-action from 2.4.0 to 2.5.0 Bumps [svenstaro/upload-release-action](https://github.com/svenstaro/upload-release-action) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/svenstaro/upload-release-action/releases) - [Changelog](https://github.com/svenstaro/upload-release-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/svenstaro/upload-release-action/compare/2.4.0...2.5.0) --- updated-dependencies: - dependency-name: svenstaro/upload-release-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/publish-binaries.yml | 8 ++++---- .github/workflows/publish-deb-brew-pkg.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml index 13555cbac..151b522fd 100644 --- a/.github/workflows/publish-binaries.yml +++ b/.github/workflows/publish-binaries.yml @@ -54,7 +54,7 @@ jobs: # No need to upload binaries for dry run (cron) - name: Upload binaries to release if: github.event_name == 'release' - uses: svenstaro/upload-release-action@2.4.0 + uses: svenstaro/upload-release-action@2.5.0 with: repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} file: target/release/meilisearch @@ -87,7 +87,7 @@ jobs: # No need to upload binaries for dry run (cron) - name: Upload binaries to release if: github.event_name == 'release' - uses: svenstaro/upload-release-action@2.4.0 + uses: svenstaro/upload-release-action@2.5.0 with: repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} file: target/release/${{ matrix.artifact_name }} @@ -123,7 +123,7 @@ jobs: - name: Upload the binary to release # No need to upload binaries for dry run (cron) if: github.event_name == 'release' - uses: svenstaro/upload-release-action@2.4.0 + uses: svenstaro/upload-release-action@2.5.0 with: repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} file: target/${{ matrix.target }}/release/meilisearch @@ -183,7 +183,7 @@ jobs: - name: Upload the binary to release # No need to upload binaries for dry run (cron) if: github.event_name == 'release' - uses: svenstaro/upload-release-action@2.4.0 + uses: svenstaro/upload-release-action@2.5.0 with: repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} file: target/${{ matrix.target }}/release/meilisearch diff --git a/.github/workflows/publish-deb-brew-pkg.yml b/.github/workflows/publish-deb-brew-pkg.yml index 13b08d071..a382df3ed 100644 --- a/.github/workflows/publish-deb-brew-pkg.yml +++ b/.github/workflows/publish-deb-brew-pkg.yml @@ -35,7 +35,7 @@ jobs: - name: Build deb package run: cargo deb -p meilisearch -o target/debian/meilisearch.deb - name: Upload debian pkg to release - uses: svenstaro/upload-release-action@2.4.0 + uses: svenstaro/upload-release-action@2.5.0 with: repo_token: ${{ secrets.MEILI_BOT_GH_PAT }} file: target/debian/meilisearch.deb From bcd3f6054a93985a9a0d8010f9d8d83c2024f652 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:58:11 +0000 Subject: [PATCH 3/7] Bump docker/build-push-action from 3 to 4 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3...v4) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/uffizzi-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 934d91522..f285b03ee 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -53,7 +53,7 @@ jobs: type=raw,value=60d - name: Build Image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: ./ file: .github/uffizzi/Dockerfile From 76cf1bff87507fc3f73ba5d8c4308d348c609aab Mon Sep 17 00:00:00 2001 From: James Lucktaylor Date: Sat, 18 Feb 2023 14:30:44 +0000 Subject: [PATCH 4/7] Add scheduled test to Actions for all features Add a new job to the Rust workflow to run 'cargo build' and 'cargo test' (on the cron schedule only) with the '--all-features' flag. This will execute across all three environments: Linux, macOS, Windows. Autoformat the Rust workflow file via the Red Hat YAML extension for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml This straightens out whitespace and string quoting for safer parsing. Fixes #3506. --- .github/workflows/rust.yml | 115 +++++++++++++++++++++++-------------- 1 file changed, 71 insertions(+), 44 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5f783ca9e..f7f1be79c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: schedule: # Everyday at 5:00am - - cron: '0 5 * * *' + - cron: "0 5 * * *" pull_request: push: # trying and staging branches are for Bors config @@ -25,36 +25,36 @@ jobs: # Use ubuntu-18.04 to compile with glibc 2.27, which are the production expectations image: ubuntu:18.04 steps: - - uses: actions/checkout@v3 - - name: Install needed dependencies - run: | - apt-get update && apt-get install -y curl - apt-get install build-essential -y - - name: Run test with Rust stable - if: github.event_name != 'schedule' - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Run test with Rust nightly - if: github.event_name == 'schedule' - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - # Disable cache due to disk space issues with Windows workers in CI - # - name: Cache dependencies - # uses: Swatinem/rust-cache@v2.2.0 - - name: Run cargo check without any default features - uses: actions-rs/cargo@v1 - with: - command: build - args: --locked --release --no-default-features --all - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --locked --release --all + - uses: actions/checkout@v3 + - name: Install needed dependencies + run: | + apt-get update && apt-get install -y curl + apt-get install build-essential -y + - name: Run test with Rust stable + if: github.event_name != 'schedule' + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Run test with Rust nightly + if: github.event_name == 'schedule' + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + # Disable cache due to disk space issues with Windows workers in CI + # - name: Cache dependencies + # uses: Swatinem/rust-cache@v2.2.0 + - name: Run cargo check without any default features + uses: actions-rs/cargo@v1 + with: + command: build + args: --locked --release --no-default-features --all + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked --release --all test-others: name: Tests on ${{ matrix.os }} @@ -64,19 +64,46 @@ jobs: matrix: os: [macos-12, windows-2022] steps: - - uses: actions/checkout@v3 -# - name: Cache dependencies -# uses: Swatinem/rust-cache@v2.2.0 - - name: Run cargo check without any default features - uses: actions-rs/cargo@v1 - with: - command: build - args: --locked --release --no-default-features --all - - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --locked --release --all + - uses: actions/checkout@v3 + # - name: Cache dependencies + # uses: Swatinem/rust-cache@v2.2.0 + - name: Run cargo check without any default features + uses: actions-rs/cargo@v1 + with: + command: build + args: --locked --release --no-default-features --all + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked --release --all + + test-all-features: + name: Tests all features on ${{ matrix.os }} on cron schedule only + + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-18.04, macos-12, windows-2022] + + if: github.event_name == 'schedule' + + steps: + - uses: actions/checkout@v3 + + - name: Run cargo build with all features + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --locked --release --all-features + + - name: Run cargo test with all features + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --locked --release --all-features # We run tests in debug also, to make sure that the debug_assertions are hit test-debug: From 2dd948a4a103c097cb866a9f90504f285bf5837b Mon Sep 17 00:00:00 2001 From: James Lucktaylor Date: Fri, 3 Mar 2023 12:07:42 +0000 Subject: [PATCH 5/7] ci(actions/rust): align with test-linux job --- .github/workflows/rust.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f7f1be79c..9ed68f5aa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -79,15 +79,11 @@ jobs: args: --locked --release --all test-all-features: - name: Tests all features on ${{ matrix.os }} on cron schedule only - - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-18.04, macos-12, windows-2022] - + name: Tests all features on cron schedule only + runs-on: ubuntu-latest + container: + # Use ubuntu-18.04 to compile with glibc 2.27, which are the production expectations + image: ubuntu:18.04 if: github.event_name == 'schedule' steps: From a9e17ab8c6637b8e75fd5551aec47536f47544f7 Mon Sep 17 00:00:00 2001 From: James Lucktaylor Date: Fri, 3 Mar 2023 12:08:30 +0000 Subject: [PATCH 6/7] style(actions/rust): resolve PR review --- .github/workflows/rust.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9ed68f5aa..4a58b9ccf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: schedule: # Everyday at 5:00am - - cron: "0 5 * * *" + - cron: '0 5 * * *' pull_request: push: # trying and staging branches are for Bors config @@ -85,16 +85,13 @@ jobs: # Use ubuntu-18.04 to compile with glibc 2.27, which are the production expectations image: ubuntu:18.04 if: github.event_name == 'schedule' - steps: - uses: actions/checkout@v3 - - name: Run cargo build with all features uses: actions-rs/cargo@v1 with: command: build args: --workspace --locked --release --all-features - - name: Run cargo test with all features uses: actions-rs/cargo@v1 with: From 22219fd88ffcfceee47779638f2382305af8dc9a Mon Sep 17 00:00:00 2001 From: James Lucktaylor Date: Mon, 6 Mar 2023 12:08:32 +0000 Subject: [PATCH 7/7] ci(actions/rust): explicitly set up dependencies and toolchain override --- .github/workflows/rust.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4a58b9ccf..14417f25c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -87,6 +87,14 @@ jobs: if: github.event_name == 'schedule' steps: - uses: actions/checkout@v3 + - name: Install needed dependencies + run: | + apt-get update + apt-get install --assume-yes build-essential curl + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Run cargo build with all features uses: actions-rs/cargo@v1 with: