Skip to content

Commit 064e23b

Browse files
authored
Merge branch 'master' into enforce-formatting
2 parents 033b2af + 6d47098 commit 064e23b

File tree

139 files changed

+1920
-5938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1920
-5938
lines changed

.github/CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#### Contributing
22
If you would like to contribute to hazelcast-cpp-client;
33
- Fork the original repo
4+
- Test your changes - the script executes builds and runs the unit tests for all bit and library versions:
5+
- Linux/Mac - [`scripts/test-unix.sh`](../scripts/test-unix.sh)
6+
- Windows - [`scripts/test-windows.bat`](../scripts/test-windows.sh)
7+
- Format the code using `clang-format`
8+
- [`scripts/format-all.sh`](../scripts/format-all.sh) can do this for you
49
- Commit your contributions in a new branch
510
- Send a Pull Request
611

712
For detailed instructions for our git process: [Developing with Git](https://hazelcast.atlassian.net/wiki/display/COM/Developing+with+Git)
813

914
In order to merge your pull request, we need the contributor to sign [Hazelcast Contributor Agreement](https://hazelcast.atlassian.net/wiki/display/COM/Hazelcast+Contributor+Agreement). You do not have to wait for approval for doing this step.
10-
11-
Please make sure that your code passes `testLinux.sh` for Linux/Mac and `testWindows.bat` for MS Windows. The script executes builds and runs the unit tests for all bit and library versions. (Alternatively, you can also use `testLinuxSingleCase.sh` or `testWindowsSingleCase.sh` for testing with a specific bit aversion and library type.

.github/actions/build-test/ubuntu-i386/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ runs:
3939
shell: bash
4040
run: |
4141
apt-get update
42-
apt-get install -y build-essential cmake curl git libssl-dev maven net-tools openjdk-${{ env.JAVA_VERSION }}-jre-headless gdb curl
42+
apt-get install -y build-essential cmake curl git libssl-dev maven net-tools openjdk-${{ env.JAVA_VERSION }}-jre-headless gdb
4343
4444
- name: Make sure the target architecture is 32 bit
4545
shell: bash
@@ -92,7 +92,7 @@ runs:
9292
./scripts/install-thrift.sh ${{ inputs.THRIFT_VERSION }}
9393
9494
- name: Configure Resources
95-
if: ${{ inputs.run_tests }}
95+
if: ${{ inputs.run_tests == 'true' }}
9696
shell: bash
9797
run: |
9898
ulimit -c unlimited

.github/actions/build-test/ubuntu-x86_64/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ runs:
5454
sudo ./scripts/install-thrift.sh ${{ inputs.THRIFT_VERSION }}
5555
5656
- name: Configure Resources
57-
if: ${{ inputs.run_tests }}
57+
if: ${{ inputs.run_tests == 'true' }}
5858
shell: bash
5959
run: |
6060
ulimit -c unlimited

.github/actions/build-test/unix/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ runs:
4949
-DBUILD_EXAMPLES=OFF
5050
5151
- name: Test
52-
if: ${{ inputs.run_tests }}
52+
if: ${{ inputs.run_tests == 'true' }}
5353
env:
5454
BUILD_DIR: build
5555
HAZELCAST_ENTERPRISE_KEY: ${{ inputs.HAZELCAST_ENTERPRISE_KEY }}

.github/actions/build-test/windows/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,16 @@ runs:
9090
tar xzf ${{ inputs.BOOST_ARCHIVE_NAME }}
9191
rm ${{ inputs.BOOST_ARCHIVE_NAME }}
9292
cd ${{ inputs.BOOST_FOLDER_NAME }}
93-
.\bootstrap.bat
93+
$vcvars = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" -ErrorAction SilentlyContinue
94+
if (-not $vcvars) { $vcvars = Get-ChildItem "C:\Program Files\Microsoft Visual Studio" -Recurse -Filter "vcvarsall.bat" | Select-Object -First 1 }
95+
cmd /c "`"$($vcvars.FullName)`" x64 > nul 2>&1 && set" | ForEach-Object { if ($_ -match "^(.*?)=(.*)$") { [Environment]::SetEnvironmentVariable($matches[1], $matches[2]) } }
96+
.\bootstrap.bat msvc
9497
# Build the libs for:
9598
# - Thread - https://www.boost.org/libs/thread/
96-
.\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread install
99+
# - Chrono - https://www.boost.org/libs/chrono/
100+
# - Atomic - https://www.boost.org/libs/atomic/
101+
# d0 turns off info logging but only prints warnings and errors.
102+
.\b2 -d0 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} toolset=msvc --with-thread --with-chrono --with-atomic install
97103
cd ..
98104
Remove-Item ${{ inputs.BOOST_FOLDER_NAME }} -Recurse -Force
99105
@@ -144,7 +150,7 @@ runs:
144150
-DBUILD_EXAMPLES=OFF
145151
146152
- name: Test
147-
if: ${{ inputs.run_tests }}
153+
if: ${{ inputs.run_tests == 'true' }}
148154
env:
149155
BUILD_DIR: build
150156
BUILD_CONFIGURATION: ${{ inputs.BUILD_TYPE }}

.github/actions/coverage-report/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ runs:
7272
-DBUILD_EXAMPLES=OFF
7373
7474
- name: Test
75-
if: ${{ inputs.run_tests }}
75+
if: ${{ inputs.run_tests == 'true' }}
7676
env:
7777
BUILD_DIR: build
7878
HAZELCAST_ENTERPRISE_KEY: ${{ inputs.HAZELCAST_ENTERPRISE_KEY }}

.github/config.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
JAVA_VERSION=17
22
JAVA_DISTRIBUTION=temurin
33
MAVEN_VERSION=3.9.11
4-
HZ_VERSION=5.5.5
4+
HZ_VERSION=5.6.0

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "vcpkg"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
boost:
9+
patterns:
10+
- "boost-*"
311
- package-ecosystem: "github-actions"
412
directory: "/"
513
schedule:

.github/workflows/build-pr.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ jobs:
5050
member-name: ${{ github.actor }}
5151
token: ${{ secrets.GH_TOKEN }}
5252

53-
# ensure we are an Hazelcast organization member OR manually running
53+
# ensure PR is trusted
5454
ensure-membership:
5555
name: Ensure Membership
5656
runs-on: ubuntu-latest
5757
needs: test-membership
5858
strategy:
5959
fail-fast: false
6060

61-
if: needs.test-membership.outputs.is-hazelcast == 'true' || github.event_name == 'workflow_dispatch'
61+
if: ${{ needs.test-membership.outputs.is-hazelcast == 'true' || github.event_name == 'workflow_dispatch' || github.actor == 'dependabot[bot]' }}
6262
steps:
6363
- name: Report
6464
shell: bash
65-
run: echo "User ${{ github.actor }} is a member of the Hazelcast organization"
65+
run: echo "User ${{ github.actor }} is trusted for test execution"
6666

6767

6868
# get
@@ -210,13 +210,11 @@ jobs:
210210
name: windows-${{ matrix.options.address_model }}-(${{ matrix.build_type }}, ${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }})
211211
steps:
212212
- uses: actions/checkout@v5
213-
if: ${{ matrix.with_openssl.toggle != 'OFF' }}
214213
with:
215214
ref: ${{ needs.get-refs.outputs.ref }}
216215
token: ${{ secrets.GH_TOKEN }}
217216

218217
- uses: ./.github/actions/build-test/windows
219-
if: ${{ matrix.with_openssl.toggle == 'ON' }}
220218
with:
221219
GH_TOKEN: ${{ secrets.GH_TOKEN }}
222220
BOOST_VERSION: ${{ env.boost_version }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Create release branch
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
BRANCH_NAME:
7+
description: The source branch to create a release branch from
8+
required: true
9+
NEXT_VERSION:
10+
description: New version to set in the source branch (e.g. 5.6.0)
11+
required: true
12+
13+
jobs:
14+
make-branch:
15+
name: Create release branch from `${{ inputs.BRANCH_NAME }}`
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
with:
20+
ref: ${{ inputs.BRANCH_NAME }}
21+
22+
- name: Determine project version
23+
id: project_version
24+
run: |
25+
echo "version=$(jq --raw-output '.version' vcpkg.json)" >> ${GITHUB_OUTPUT}
26+
27+
- name: Create `${{ steps.project_version.outputs.version }}` branch
28+
run: |
29+
git checkout -b ${{ steps.project_version.outputs.version }}
30+
git push origin ${{ steps.project_version.outputs.version }}
31+
32+
update-version:
33+
name: Update next version in `${{ inputs.BRANCH_NAME }}` to `${{ inputs.NEXT_VERSION }}`
34+
runs-on: ubuntu-latest
35+
env:
36+
NEW_VERSION: ${{ inputs.NEXT_VERSION }}
37+
steps:
38+
- uses: actions/checkout@v5
39+
with:
40+
ref: ${{ inputs.BRANCH_NAME }}
41+
42+
- name: Update `vcpkg.json`
43+
run: |
44+
cat <<< $(jq --arg ver "${NEW_VERSION}" '.version = $ver' vcpkg.json) > vcpkg.json
45+
46+
- name: Update `CMakeLists.txt`s
47+
run: |
48+
find . -name 'CMakeLists.txt' | \
49+
xargs perl -0777 -i -pe 's/(project\s*\([^)]*?\bVERSION\s+)\S+/\1$ENV{NEW_VERSION}/s'
50+
51+
- name: Create Pull Request
52+
uses: peter-evans/create-pull-request@v7
53+
with:
54+
branch: Update_version_to_${{ inputs.NEXT_VERSION }}_run_${{ github.run_id }}
55+
title: Update development version to `${{ inputs.NEXT_VERSION }}`
56+
body: ""

0 commit comments

Comments
 (0)