Skip to content

backwards_compatibility #5

backwards_compatibility

backwards_compatibility #5

name: backwards_compatibility
on:
pull_request:
branches:
- master
types: [opened, synchronize, reopened]
jobs:
check_commit_message:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.check_commit.outputs.skip }}
steps:
- uses: actions/checkout@v4
- name: Check for BREAKING_CHANGE in commit message
id: check_commit
run: |
COMMIT_MSG=$(git log --format=%B -n 1 HEAD)
echo "Commit message: $COMMIT_MSG"
if echo "$COMMIT_MSG" | grep -q "BREAKING_CHANGE"; then
echo "should_skip=true" >> $GITHUB_OUTPUT
else
echo "should_skip=false" >> $GITHUB_OUTPUT
fi
build_and_test:
runs-on: ubuntu-latest
needs: check_commit_message
if: ${{ needs.check_commit_message.outputs.should_skip != 'true' }}
steps:
- uses: actions/checkout
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
with:
key: "v2"
- name: Build (code from PR)
run: cargo build
- name: Run bench (code from PR)
run: cargo run --bin iggy-bench -- --verbose send --message-batches 50 --messages-per-batch 50 tcp
- name: Build (origin/master)
run: git reset --hard origin/master && cargo build
- name: Run send bench (origin/master)
run: cargo run --bin iggy-bench -- --verbose send --message-batches 50 --messages-per-batch 50 tcp
- name: Run poll bench (origin/master)
run: cargo run --bin iggy-bench -- --verbose poll --message-batches 50 --messages-per-batch 50 tcp