From 9283cb9436c1d27f6a9921945ffac354dd719e12 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Wed, 27 Mar 2024 09:10:45 +0100 Subject: [PATCH 1/4] chore: remove unused files --- ci/cargo_build.sh | 1 - ci/cargo_clippy.sh | 1 - ci/cargo_fmt_check.sh | 1 - ci/cargo_test.sh | 1 - ci/install_sccache_linux.sh | 9 --------- ci/sccache_show_stats.sh | 1 - ci/sccache_start_server.sh | 1 - ci/sccache_stop_server.sh | 1 - dev/rust_lint.sh | 29 ----------------------------- 9 files changed, 45 deletions(-) delete mode 100755 ci/cargo_build.sh delete mode 100755 ci/cargo_clippy.sh delete mode 100755 ci/cargo_fmt_check.sh delete mode 100755 ci/cargo_test.sh delete mode 100755 ci/install_sccache_linux.sh delete mode 100755 ci/sccache_show_stats.sh delete mode 100755 ci/sccache_start_server.sh delete mode 100755 ci/sccache_stop_server.sh delete mode 100755 dev/rust_lint.sh diff --git a/ci/cargo_build.sh b/ci/cargo_build.sh deleted file mode 100755 index 7d3c45d..0000000 --- a/ci/cargo_build.sh +++ /dev/null @@ -1 +0,0 @@ -cargo build \ No newline at end of file diff --git a/ci/cargo_clippy.sh b/ci/cargo_clippy.sh deleted file mode 100755 index f75eba5..0000000 --- a/ci/cargo_clippy.sh +++ /dev/null @@ -1 +0,0 @@ - cargo clippy --all-features --all-targets --workspace -- -D warnings \ No newline at end of file diff --git a/ci/cargo_fmt_check.sh b/ci/cargo_fmt_check.sh deleted file mode 100755 index d4a06a0..0000000 --- a/ci/cargo_fmt_check.sh +++ /dev/null @@ -1 +0,0 @@ -cargo fmt --all -- --check \ No newline at end of file diff --git a/ci/cargo_test.sh b/ci/cargo_test.sh deleted file mode 100755 index e74ce90..0000000 --- a/ci/cargo_test.sh +++ /dev/null @@ -1 +0,0 @@ -cargo test \ No newline at end of file diff --git a/ci/install_sccache_linux.sh b/ci/install_sccache_linux.sh deleted file mode 100755 index 2174b9b..0000000 --- a/ci/install_sccache_linux.sh +++ /dev/null @@ -1,9 +0,0 @@ -LINK=${LINK:-'https://github.com/mozilla/sccache/releases/download'} -SCCACHE_VERSION=${SCCACHE_VERSION:-'v0.3.0'} - -SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl -mkdir -p $HOME/.local/bin -curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz -mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache -chmod a+x $HOME/.local/bin/sccache -echo "$HOME/.local/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/ci/sccache_show_stats.sh b/ci/sccache_show_stats.sh deleted file mode 100755 index de404e2..0000000 --- a/ci/sccache_show_stats.sh +++ /dev/null @@ -1 +0,0 @@ -sccache --show-stats \ No newline at end of file diff --git a/ci/sccache_start_server.sh b/ci/sccache_start_server.sh deleted file mode 100755 index a002e57..0000000 --- a/ci/sccache_start_server.sh +++ /dev/null @@ -1 +0,0 @@ -sccache --start-server \ No newline at end of file diff --git a/ci/sccache_stop_server.sh b/ci/sccache_stop_server.sh deleted file mode 100755 index b980baf..0000000 --- a/ci/sccache_stop_server.sh +++ /dev/null @@ -1 +0,0 @@ -sccache --stop-server || true \ No newline at end of file diff --git a/dev/rust_lint.sh b/dev/rust_lint.sh deleted file mode 100755 index 09dbbc4..0000000 --- a/dev/rust_lint.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -set -e -if ! command -v cargo-tomlfmt &> /dev/null; then - echo "Installing cargo-tomlfmt using cargo" - cargo install cargo-tomlfmt -fi - -script_dir=$(dirname "$0") - -cargo fmt --all -$script_dir/../ci/cargo_clippy.sh -cargo tomlfmt -p ./Cargo.toml \ No newline at end of file From ef0793c7439e5cba4aa8e2d9d8488a19d9e6ea06 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Wed, 27 Mar 2024 09:20:22 +0100 Subject: [PATCH 2/4] ci: start/stop minio before/after tests --- .github/workflows/test_suite.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml index 3871f60..161726c 100644 --- a/.github/workflows/test_suite.yml +++ b/.github/workflows/test_suite.yml @@ -16,7 +16,11 @@ jobs: with: submodules: recursive - uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: Start minio + run: ./ci/minio_start.sh - run: cargo test --all-features + - name: Stop minio + run: ./ci/minio_stop.sh # Check formatting with rustfmt formatting: From a42c703ce2243989747774ebb89bd2fcfff87c70 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Wed, 27 Mar 2024 09:35:22 +0100 Subject: [PATCH 3/4] docs: updated developer instructions --- Development.md | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/Development.md b/Development.md index 9ab7447..c0d1f94 100644 --- a/Development.md +++ b/Development.md @@ -1,23 +1,13 @@ # Development -Uses standard rust toolchain: +## Standard rust toolchain: -```bash -cargo build -cargo test -cargo publish -``` - -Linting: +Uses the familiar cargo targets: build, test, fmt, clippy -```bash -cargo fmt -cargo clippy --all-features --all-targets --workspace -- -D warnings -cargo tomlfmt -p ./Cargo.toml -``` - -Or all in one as following: +## Testing ```bash -./dev/rust_lint.sh +./ci/minio_start.sh +cargo test +./ci/minio_stop.sh ``` From 54efee978c858bf85e8158a4105640725948a2d2 Mon Sep 17 00:00:00 2001 From: Tim Van Wassenhove Date: Wed, 27 Mar 2024 09:36:28 +0100 Subject: [PATCH 4/4] docs: added entry on releases --- Development.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Development.md b/Development.md index c0d1f94..a07a786 100644 --- a/Development.md +++ b/Development.md @@ -11,3 +11,9 @@ Uses the familiar cargo targets: build, test, fmt, clippy cargo test ./ci/minio_stop.sh ``` + +## Releasing + +Leverages [Release-plz](https://github.com/MarcoIeni/release-plz) to build Release PR's. + +