This is an automated email from the ASF dual-hosted git repository.
piotr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new 6b6fcaad chore(ci): add new CI workflows for PR validation and testing
(#1621)
6b6fcaad is described below
commit 6b6fcaadd72c7488c90be6ea3c6425d22e888ec5
Author: Bartosz Cieśla <[email protected]>
AuthorDate: Wed Mar 12 08:31:26 2025 +0100
chore(ci): add new CI workflows for PR validation and testing (#1621)
---
.convco | 1 +
.github/workflows/ci-check-common.yml | 82 +++++++++
.github/workflows/ci-check-pr.yml | 139 +++++++++++++++
.github/workflows/ci-check-rust.yml | 189 +++++++++++++++++++++
.github/workflows/ci-check-shell.yml | 41 +++++
...compatibility.yml => ci-compatibility-rust.yml} | 12 +-
.../{coverage.yml => ci-coverage-rust.yml} | 24 ++-
.github/workflows/ci-test-rust-optional.yml | 66 +++++++
.github/workflows/ci-test-rust.yml | 109 ++++++++++++
.github/workflows/test_pr.yml | 4 +-
.../performance/run-standard-performance-suite.sh | 2 +
11 files changed, 657 insertions(+), 12 deletions(-)
diff --git a/.convco b/.convco
new file mode 100644
index 00000000..994dec65
--- /dev/null
+++ b/.convco
@@ -0,0 +1 @@
+scopeRegex: "(ci|sdk|server|cli|bench|misc)(,(ci|sdk|server|cli|bench|misc))*"
\ No newline at end of file
diff --git a/.github/workflows/ci-check-common.yml
b/.github/workflows/ci-check-common.yml
new file mode 100644
index 00000000..efd232f8
--- /dev/null
+++ b/.github/workflows/ci-check-common.yml
@@ -0,0 +1,82 @@
+# 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.
+#
+# -------------------------------------------------------------
+#
+# CI Check Common Workflow
+#
+# This workflow validates commit messages and checks for conventional commits.
+# This workflow is mandatory and runs on pull request events.
+#
+name: ci-check-common
+
+on:
+ workflow_call:
+ inputs:
+ commits-from:
+ description: 'Lower end of the commit range to check'
+ required: true
+ default: HEAD~1
+ type: string
+ commits-to:
+ description: 'Upper end of the commit range to check'
+ required: true
+ default: HEAD
+ type: string
+
+jobs:
+ check-commit-message:
+ name: commit messages
+ runs-on: ubuntu-latest
+ if: ${{ github.event_name == 'pull_request' }}
+ steps:
+ - name: Check subject line length
+ uses: gsactions/commit-message-checker@v2
+ with:
+ excludeDescription: "false" # exclude description body of a pull
request
+ excludeTitle: "false" # exclude the title of a pull request
+ checkAllCommitMessages: "false" # checks all commits associated with
the pull request
+ accessToken: ${{ secrets.GITHUB_TOKEN }} # needed only when
checkAllCommitMessages is true
+ pattern: '^.{0,80}(\n.*)*$'
+ error: "Subject of all commits in the PR and PR body/title has to be
shorter than 80 characters."
+
+ check-conventional-commits:
+ name: conventional commits
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Install rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Install convco
+ uses: taiki-e/install-action@v2
+ with:
+ tool: convco
+ - name: Print commit range to check
+ run: |
+ echo "Checking commit range from ${{ inputs.commits-from }} to ${{
inputs.commits-to }}"
+ - name: Check commit messages
+ run: |
+ command -v convco
+ convco --version
+ git log ${{ inputs.commits-from }}..${{ inputs.commits-to }}
+ convco check ${{ inputs.commits-from }}..${{ inputs.commits-to }}
diff --git a/.github/workflows/ci-check-pr.yml
b/.github/workflows/ci-check-pr.yml
new file mode 100644
index 00000000..63124d3b
--- /dev/null
+++ b/.github/workflows/ci-check-pr.yml
@@ -0,0 +1,139 @@
+# 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.
+#
+# -------------------------------------------------------------
+#
+# CI Check PR Workflow
+#
+# This workflow validates pull requests to the master branch by detecting
changed files
+# and running appropriate checks and tests.
+#
+# Flow:
+# 1. pr-file-changes: Detects which file types were modified (mandatory)
+# 2. ci-check-common: Validates commit message (mandatory)
+# 3. Conditional jobs based on file changes:
+# - For Rust changes: ci-check-rust → ci-test-rust → ci-test-rust-optional
& ci-compatibility-rust
+# - For shell changes: ci-check-shell
+# 4. finalize-pr: Determines final PR status based on all job results
(mandatory)
+#
+# Dependencies:
+# - ci-check-rust depends on pr-file-changes (outputs.trigger-rust)
+# - ci-test-rust and ci-compatibility-rust depend on ci-check-rust success
+# - ci-check-shell depends on pr-file-changes (outputs.trigger-shell)
+# - finalize-pr depends on all other jobs
+#
+# The workflow fails if any mandatory job fails.
+# Workflow can be triggered manually or on pull request events.
+#
+name: ci-check-pr
+
+on:
+ workflow_dispatch:
+ pull_request:
+ branches:
+ - master
+ types: [ opened, synchronize, reopened ]
+
+jobs:
+ pr-file-changes:
+ name: pr-file-changes
+ runs-on: ubuntu-latest
+ outputs:
+ trigger-rust: ${{ steps.changed-files-yaml.outputs.rust_any_changed }}
+ trigger-shell: ${{ steps.changed-files-yaml.outputs.shell_any_changed }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Check changed files
+ id: changed-files-yaml
+ uses: tj-actions/changed-files@v45
+ with:
+ files_yaml: |
+ rust:
+ - '**/*.rs'
+ - '**/Cargo.toml'
+ - Cargo.toml
+ - Cargo.lock
+ shell:
+ - 'scripts/**/*.sh'
+ - name: List all changed files
+ run: |
+ if [ "${{ steps.changed-files-yaml.outputs.rust_any_changed }}" ==
"true" ]; then
+ echo "One or more rust file(s) has changed."
+ echo "List all the files that have changed: ${{
steps.changed-files-yaml.outputs.rust_all_changed_files }}"
+ fi
+ if [ "${{ steps.changed-files-yaml.outputs.shell_any_changed }}" ==
"true" ]; then
+ echo "One or more shell file(s) has changed."
+ echo "List all the files that have changed: ${{
steps.changed-files-yaml.outputs.shell_all_changed_files }}"
+ fi
+
+ ci-check-common:
+ name: ci-check-common
+ uses: ./.github/workflows/ci-check-common.yml
+ with:
+ commits-from: ${{ github.event_name == 'pull_request' &&
github.event.pull_request.base.sha || 'HEAD~1' }}
+ commits-to: ${{ github.event_name == 'pull_request' &&
github.event.pull_request.head.sha || 'HEAD' }}
+
+ ci-check-rust:
+ name: ci-check-rust
+ needs: pr-file-changes
+ if: ${{ needs.pr-file-changes.outputs.trigger-rust == 'true' }}
+ uses: ./.github/workflows/ci-check-rust.yml
+
+ ci-test-rust:
+ name: ci-test-rust
+ needs: ci-check-rust
+ if: ${{ needs.ci-check-rust.result == 'success' }}
+ uses: ./.github/workflows/ci-test-rust.yml
+
+ ci-test-rust-optional:
+ name: ci-test-rust-optional
+ needs: ci-check-rust
+ if: ${{ needs.ci-check-rust.result == 'success' }}
+ uses: ./.github/workflows/ci-test-rust-optional.yml
+
+ ci-compatibility-rust:
+ name: ci-compatibility-rust
+ needs: ci-check-rust
+ if: ${{ needs.ci-check-rust.result == 'success' }}
+ uses: ./.github/workflows/ci-compatibility-rust.yml
+ with:
+ pr_body: ${{ github.event.pull_request.body }}
+
+ ci-check-shell:
+ name: ci-check-shell
+ needs: pr-file-changes
+ if: ${{ needs.pr-file-changes.outputs.trigger-shell == 'true' }}
+ uses: ./.github/workflows/ci-check-shell.yml
+
+ finalize-pr:
+ runs-on: ubuntu-latest
+ needs:
+ - ci-check-common
+ - ci-check-rust
+ - ci-test-rust
+ - ci-compatibility-rust
+ - ci-check-shell
+ if: always()
+ steps:
+ - name: Everything is fine
+ if: ${{ !(contains(needs.*.result, 'failure')) }}
+ run: exit 0
+
+ - name: Some tests failed
+ if: ${{ contains(needs.*.result, 'failure') }}
+ run: exit 1
diff --git a/.github/workflows/ci-check-rust.yml
b/.github/workflows/ci-check-rust.yml
new file mode 100644
index 00000000..44e82b8e
--- /dev/null
+++ b/.github/workflows/ci-check-rust.yml
@@ -0,0 +1,189 @@
+# 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.
+#
+# -------------------------------------------------------------
+#
+# CI Check Rust Workflow
+#
+# This workflow runs checks for Rust code using cargo commands.
+# Checks include:
+# - static analysis using `cargo check`
+# - code formatting using `cargo fmt`
+# - linting using `cargo clippy`
+# - sorted dependencies check using `cargo sort`
+# - documentation tests using `cargo test --doc`
+# - unused dependencies check using `cargo machete`
+#
+# This workflow can be triggered manually or by other workflows.
+#
+name: ci-check-rust
+
+on:
+ workflow_dispatch:
+ workflow_call:
+
+env:
+ RUST_BACKTRACE: 1
+ CARGO_TERM_COLOR: always
+
+jobs:
+ check:
+ name: cargo check
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo check
+ uses: actions-rs/cargo@v1
+ with:
+ command: check
+
+ fmt:
+ name: cargo fmt
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo fmt
+ uses: actions-rs/cargo@v1
+ with:
+ command: fmt
+ args: --all -- --check
+
+ clippy:
+ name: cargo clippy
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo clippy
+ uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: --all-targets --all-features -- -D warnings
+
+ clippy-macos:
+ name: cargo clippy macos
+ runs-on: macos-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo clippy (macos)
+ uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: --all-targets --all-features -- -D warnings
+
+ clippy-windows:
+ name: cargo clippy windows
+ runs-on: windows-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo clippy (windows/sdk)
+ uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: --package iggy --all-features -- -D warnings
+ - name: Run cargo clippy (windows/cli)
+ uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: --bin iggy --all-features -- -D warnings
+
+ sort:
+ name: cargo sort
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Install cargo-sort
+ uses: taiki-e/install-action@v2
+ with:
+ tool: cargo-sort
+ - name: Run cargo sort
+ uses: actions-rs/cargo@v1
+ with:
+ command: sort
+ args: --check --workspace
+
+ doctest:
+ name: cargo test docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo test (doc)
+ uses: actions-rs/cargo@v1
+ with:
+ command: test
+ args: --doc
+
+ unused_dependencies:
+ name: cargo machete
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Install cargo-machete
+ uses: taiki-e/install-action@v2
+ with:
+ tool: cargo-machete
+ - name: Run cargo machete
+ uses: actions-rs/cargo@v1
+ with:
+ command: machete
diff --git a/.github/workflows/ci-check-shell.yml
b/.github/workflows/ci-check-shell.yml
new file mode 100644
index 00000000..baaf8df3
--- /dev/null
+++ b/.github/workflows/ci-check-shell.yml
@@ -0,0 +1,41 @@
+# 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.
+#
+# -------------------------------------------------------------
+#
+# CI Check Shell Workflow
+#
+# This workflow runs shellcheck on shell scripts in the repository.
+# This workflow can be triggered manually or by other workflows.
+#
+name: ci-check-shell
+on:
+ workflow_dispatch:
+ workflow_call:
+
+jobs:
+ shellcheck:
+ name: shellcheck
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Install shellcheck on Linux
+ run: |
+ sudo apt-get update --yes && sudo apt-get install --yes shellcheck
+ - name: Check shell scripts
+ run: find scripts -type f -name "*.sh" -exec shellcheck {} +
diff --git a/.github/workflows/backwards_compatibility.yml
b/.github/workflows/ci-compatibility-rust.yml
similarity index 94%
rename from .github/workflows/backwards_compatibility.yml
rename to .github/workflows/ci-compatibility-rust.yml
index 4e06ebb5..5ed98407 100644
--- a/.github/workflows/backwards_compatibility.yml
+++ b/.github/workflows/ci-compatibility-rust.yml
@@ -14,8 +14,17 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-
+#
+# -------------------------------------------------------------
+#
+# CI Compatibility Rust Workflow
+#
+# This workflow runs compatibility tests for Rust code on the master branch
for pull requests.
+# This workflow is triggered by the ci-check-pr workflow. It checks if
BREAKING_CHANGE in the PR body
+# and commit messages and skips the compatibility tests if found.
+#
name: backwards_compatibility
+
on:
workflow_call:
inputs:
@@ -177,4 +186,3 @@ jobs:
- name: Print server logs (PR)
run: cat local_data/logs/iggy*
-
diff --git a/.github/workflows/coverage.yml
b/.github/workflows/ci-coverage-rust.yml
similarity index 82%
rename from .github/workflows/coverage.yml
rename to .github/workflows/ci-coverage-rust.yml
index 5962179a..c5166a07 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/ci-coverage-rust.yml
@@ -14,25 +14,33 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-
-name: coverage
+#
+# -------------------------------------------------------------
+#
+# CI Coverage Rust Workflow
+#
+# This workflow runs tests for Rust code and generates coverage report.
+# This workflow can be triggered manually or by other workflows.
+#
+name: ci-coverage-rust
on:
workflow_dispatch:
workflow_call:
env:
+ RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
+ IGGY_CI_BUILD: true
GITHUB_BOT_CONTEXT_STRING: "coveralls coverage reporting job"
jobs:
coverage:
- name: Code coverage
+ name: coverage
runs-on: ubuntu-latest
- env:
- CARGO_TERM_COLOR: always
+ timeout-minutes: 30
steps:
- - name: Checkout
+ - name: Checkout code
uses: actions/checkout@v4
- name: Cache cargo & target directories
@@ -40,7 +48,7 @@ jobs:
with:
key: "coverage"
- - name: Install gnome-keyring and keyutils on Linux
+ - name: Install gnome-keyring, keyutils and lcov
run: |
sudo apt-get update --yes && sudo apt-get install --yes
gnome-keyring keyutils lcov
rm -f $HOME/.local/share/keyrings/*
@@ -65,7 +73,7 @@ jobs:
- name: Upload code to Coveralls
# Do not upload coverage for user triggered workflows
- if: github.event_name == 'workflow_call'
+ if: ${{ github.event_name == 'workflow_call' }}
uses: coverallsapp/github-action@v2
with:
fail-on-error: false
diff --git a/.github/workflows/ci-test-rust-optional.yml
b/.github/workflows/ci-test-rust-optional.yml
new file mode 100644
index 00000000..2b0443c8
--- /dev/null
+++ b/.github/workflows/ci-test-rust-optional.yml
@@ -0,0 +1,66 @@
+# 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.
+#
+# -------------------------------------------------------------
+#
+# CI Test Rust Optional Workflow
+#
+# This workflow runs tests for Rust code on aarch64-apple-darwin target and
generates coverage report.
+# This workflow is optional and can be triggered manually or by other
workflows.
+#
+name: ci-test-rust-optional
+
+on:
+ workflow_dispatch:
+ workflow_call:
+
+env:
+ RUST_BACKTRACE: 1
+ CARGO_TERM_COLOR: always
+ IGGY_CI_BUILD: true
+
+jobs:
+ ci-coverage-rust:
+ name: ci-coverage-rust
+ uses: ./.github/workflows/ci-coverage-rust.yml
+
+ aarch64-apple-darwin:
+ name: aarch64-apple-darwin
+ runs-on: macos-latest
+ timeout-minutes: 30
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Cache cargo & target directories
+ uses: Swatinem/rust-cache@v2
+ with:
+ key: "aarch64-apple-darwin"
+ - name: Prepare aarch64-apple-darwin toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ target: aarch64-apple-darwin
+ - name: Set verbose flag
+ shell: bash
+ run: echo "VERBOSE_FLAG=$([[ "${RUNNER_DEBUG}" = "1" ]] && echo
"--verbose" || echo "")" >> $GITHUB_ENV
+ - name: Build binary
+ run: cargo build ${{ env.VERBOSE_FLAG }} --target aarch64-apple-darwin
+ - name: Run tests
+ run: cargo test ${{ env.VERBOSE_FLAG }} --target aarch64-apple-darwin
+ - name: Check if workspace is clean
+ run: git status | grep "working tree clean" || { git status ; exit 1; }
diff --git a/.github/workflows/ci-test-rust.yml
b/.github/workflows/ci-test-rust.yml
new file mode 100644
index 00000000..b4d6956d
--- /dev/null
+++ b/.github/workflows/ci-test-rust.yml
@@ -0,0 +1,109 @@
+# 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.
+#
+# -------------------------------------------------------------
+#
+# CI Test Rust Workflow
+#
+# This workflow runs tests for Rust code.
+# All tests are run on multiple targets:
+# - x86_64-unknown-linux-musl
+# - x86_64-unknown-linux-gnu
+# - x86_64-pc-windows-msvc
+#
+# This workflow can be triggered manually or by other workflows.
+#
+name: ci-test-rust
+
+on:
+ workflow_dispatch:
+ workflow_call:
+
+env:
+ RUST_BACKTRACE: 1
+ CARGO_TERM_COLOR: always
+ IGGY_CI_BUILD: true
+
+jobs:
+ x86_64-unknown-linux:
+ name: ${{ matrix.target }}
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ strategy:
+ matrix:
+ target: [x86_64-unknown-linux-musl, x86_64-unknown-linux-gnu]
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Cache cargo & target directories
+ uses: Swatinem/rust-cache@v2
+ with:
+ key: "${{ matrix.target }}"
+ - name: Install musl-tools, gnome-keyring and keyutils
+ run: |
+ sudo apt-get update --yes && sudo apt-get install --yes musl-tools
gnome-keyring keyutils
+ rm -f $HOME/.local/share/keyrings/*
+ echo -n "test" | gnome-keyring-daemon --unlock
+ - name: Prepare ${{ matrix.target }} toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ target: ${{ matrix.target }}
+ - name: Set verbose flag
+ shell: bash
+ run: echo "VERBOSE_FLAG=$([[ "${RUNNER_DEBUG}" = "1" ]] && echo
"--verbose" || echo "")" >> $GITHUB_ENV
+ - name: Build binary ${{ matrix.target }}
+ run: cargo build ${{ env.VERBOSE_FLAG }} --target ${{ matrix.target }}
+ - name: Run tests ${{ matrix.target }}
+ run: cargo test ${{ env.VERBOSE_FLAG }} --target ${{ matrix.target }}
+ - name: Check CLI examples from README
+ run: ./scripts/run-examples-from-readme.sh
+ - name: Check if workspace is clean
+ run: git status | grep "working tree clean" || { git status ; exit 1; }
+
+ x86_64-pc-windows-msvc:
+ name: x86_64-pc-windows-msvc
+ runs-on: windows-latest
+ timeout-minutes: 30
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Cache cargo & target directories
+ uses: Swatinem/rust-cache@v2
+ with:
+ key: "x86_64-pc-windows-msvc"
+ - name: Prepare x86_64-pc-windows-msvc toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ target: x86_64-pc-windows-msvc
+ - name: Set verbose flag
+ shell: pwsh
+ run: |
+ if ($env:RUNNER_DEBUG -eq "1") {
+ echo "VERBOSE_FLAG=--verbose" >> $env:GITHUB_ENV
+ } else {
+ echo "VERBOSE_FLAG=" >> $env:GITHUB_ENV
+ }
+ - name: Build iggy package
+ run: cargo build ${{ env.VERBOSE_FLAG }} --target
x86_64-pc-windows-msvc -p iggy
+ - name: Build iggy-cli binary
+ run: cargo build ${{ env.VERBOSE_FLAG }} --target
x86_64-pc-windows-msvc --bin iggy
+ - name: Check if workspace is clean
+ run: git status | grep "working tree clean" || { git status ; exit 1; }
diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml
index 610962f3..5e31b2cc 100644
--- a/.github/workflows/test_pr.yml
+++ b/.github/workflows/test_pr.yml
@@ -59,12 +59,12 @@ jobs:
(contains(github.event.head_commit.modified, '.rs') ||
contains(github.event.head_commit.modified, 'Cargo.toml') ||
contains(github.event.head_commit.modified, 'Cargo.lock')))
- uses: ./.github/workflows/coverage.yml
+ uses: ./.github/workflows/ci-coverage-rust.yml
needs: sanity
backwards_compatibility:
name: Backwards compatibility
- uses: ./.github/workflows/backwards_compatibility.yml
+ uses: ./.github/workflows/ci-compatibility-rust.yml
needs: sanity
with:
pr_body: ${{ github.event.pull_request.body }}
diff --git a/scripts/performance/run-standard-performance-suite.sh
b/scripts/performance/run-standard-performance-suite.sh
index 190ac355..f7a35907 100755
--- a/scripts/performance/run-standard-performance-suite.sh
+++ b/scripts/performance/run-standard-performance-suite.sh
@@ -113,7 +113,9 @@
NORMAL_BATCH_NO_WAIT_ONLY_CACHE_PINNED_PRODUCER=$(construct_bench_command "$IGGY
NORMAL_BATCH_NO_WAIT_ONLY_CACHE_PINNED_CONSUMER=$(construct_bench_command
"$IGGY_BENCH_CMD" "pinned-consumer" 8 8 1000 1000 1000 tcp
"send_no_wait_only_cache" "$IDENTIFIER") # 8GB data, 1KB messages, 1000
msgs/batch with no_wait config
# Single actor tests with cache disabled
+# shellcheck disable=SC2034
NO_CACHE_SINGLE_PINNED_PRODUCER=$(construct_bench_command "$IGGY_BENCH_CMD"
"pinned-producer" 1 1 1000 1000 5000 tcp "1_producer_no_cache" "$IDENTIFIER") #
5GB data, 1KB messages, 100 msgs/batch with forced cache
+# shellcheck disable=SC2034
NO_CACHE_SINGLE_PINNED_CONSUMER=$(construct_bench_command "$IGGY_BENCH_CMD"
"pinned-consumer" 1 1 1000 1000 5000 tcp "1_consumer_no_cache" "$IDENTIFIER") #
5GB data, 1KB messages, 100 msgs/batch with forced cache
# Consumer group tests with cache enabled