Bump codecov/codecov-action from 2 to 5 #318
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Workflow: Build&Test PR for Hazelcast organization members | |
# This workflow builds multiple configurations for MacOS, Windows, Ubuntu i386 and Ubuntu x64 | |
# If all the builds and tests are success, the PR can be merged. | |
# It also runs code-coverage and upload the result as an artifact. | |
name: Build&Test PR | |
on: | |
# automatic on every pull request | |
pull_request_target: | |
# manual (for community PRs that we want to force-run here) | |
workflow_dispatch: | |
inputs: | |
# the PR number eg 712 | |
pr_number: | |
description: Enter guest PR number to run test & coverage on it. | |
required: true | |
# the PR HEAD commit SHA which MUST have been verified | |
pr_commit: | |
description: Enter guest PR verified HEAD commit SHA. | |
required: true | |
env: | |
boost_version: 1.78.0 | |
boost_archive_name: 'boost_1_78_0.tar.gz' | |
boost_folder_name: 'boost_1_78_0' | |
boost_include_folder: 'C:\Boost\include\boost-1_78' | |
boost_url: 'https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz' | |
thrift_version: 0.13.0 | |
run_tests: false | |
jobs: | |
# test hazelcast membership | |
test-membership: | |
name: Test Hazelcast Membership | |
runs-on: ubuntu-latest | |
outputs: | |
is-hazelcast: ${{ steps.test-membership.outputs.is-member }} | |
steps: | |
# checkout the hazelcast/hazelcast-cpp-client repository | |
# bare minimum - just to use actions | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
submodules: false | |
- name: Test | |
id: test-membership | |
uses: ./.github/actions/test-membership | |
with: | |
organization-name: hazelcast | |
member-name: ${{ github.actor }} | |
token: ${{ secrets.GH_TOKEN }} | |
# ensure we are an Hazelcast organization member OR manually running | |
ensure-membership: | |
name: Ensure Membership | |
runs-on: ubuntu-latest | |
needs: test-membership | |
strategy: | |
fail-fast: false | |
if: needs.test-membership.outputs.is-hazelcast == 'true' || github.event_name == 'workflow_dispatch' | |
steps: | |
- name: Report | |
shell: bash | |
run: echo "User ${{ github.event.pull_request.head.repo.owner.login }} is a member of the Hazelcast organization" | |
# get | |
get-refs: | |
name: Get Refs | |
runs-on: ubuntu-latest | |
needs: ensure-membership | |
outputs: | |
ref: ${{ steps.get-refs.outputs.ref }} | |
merged-ref: ${{ steps.get-refs.outputs.merged-ref }} | |
steps: | |
- name: Get Refs | |
id: get-refs | |
shell: bash | |
run: | | |
echo "EVENT: ${{ github.event_name }}" | |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
echo "PR_NUMBER: ${{ inputs.pr_number }}" | |
echo "PR_COMMIT: ${{ inputs.pr_commit }}" | |
echo "ref=refs/pull/${{ inputs.pr_number }}/merge" >> $GITHUB_OUTPUT | |
echo "merged-ref=${{ inputs.pr_commit }}" >> $GITHUB_OUTPUT | |
else | |
echo "PR_NUMBER: ${{ github.event.pull_request.number }}" | |
echo "ref=refs/pull/${{ github.event.pull_request.number }}/merge" >> $GITHUB_OUTPUT | |
echo "merged-ref=''" >> $GITHUB_OUTPUT | |
fi | |
# run for code-coverage and upload the result as an artifact. | |
code-coverage: | |
runs-on: ubuntu-latest | |
needs: get-refs | |
name: Code Coverage | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.get-refs.outputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: ./.github/actions/coverage-report | |
with: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BOOST_VERSION: ${{ env.boost_version }} | |
THRIFT_VERSION: ${{ env.thrift_version }} | |
RUN_TESTS: ${{ env.run_tests }} | |
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ secrets.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }} | |
Ubuntu-i386: | |
needs: get-refs | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: | |
- type: Debug | |
warn_as_err: ON | |
- type: Release | |
warn_as_err: OFF | |
shared_libs: | |
- toggle: OFF | |
name: Static | |
- toggle: ON | |
name: Shared | |
with_openssl: | |
- toggle: OFF | |
name: 'noSSL' | |
- toggle: ON | |
name: 'SSL' | |
runs-on: ubuntu-latest | |
container: | |
image: i386/ubuntu | |
options: --privileged | |
name: ubuntu-i386-(${{ matrix.build_type.type }}, ${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }}) | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v1 | |
with: | |
ref: ${{ needs.get-refs.outputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: ./.github/actions/build-test/ubuntu-i386 | |
with: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BOOST_VERSION: ${{ env.boost_version }} | |
THRIFT_VERSION: ${{ env.thrift_version }} | |
WARN_AS_ERR: ${{ matrix.build_type.warn_as_err }} | |
BUILD_TYPE: ${{ matrix.build_type.type }} | |
SHARED_LIBS_TOGGLE: ${{ matrix.shared_libs.toggle }} | |
OPENSSL_TOGGLE: ${{ matrix.with_openssl.toggle }} | |
RUN_TESTS: ${{ env.run_tests }} | |
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ secrets.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }} | |
Ubuntu-x86_64: | |
needs: get-refs | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: | |
- type: Debug | |
warn_as_err: ON | |
- type: Release | |
warn_as_err: OFF | |
shared_libs: | |
- toggle: OFF | |
name: Static | |
- toggle: ON | |
name: Shared | |
with_openssl: | |
- toggle: OFF | |
name: noSSL | |
- toggle: ON | |
name: SSL | |
runs-on: ubuntu-latest | |
name: ubuntu-x64-(${{ matrix.build_type.type }}, ${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }}) | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.get-refs.outputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: ./.github/actions/build-test/ubuntu-x86_64 | |
with: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BOOST_VERSION: ${{ env.boost_version }} | |
THRIFT_VERSION: ${{ env.thrift_version }} | |
WARN_AS_ERR: ${{ matrix.build_type.warn_as_err }} | |
BUILD_TYPE: ${{ matrix.build_type.type }} | |
SHARED_LIBS_TOGGLE: ${{ matrix.shared_libs.toggle }} | |
OPENSSL_TOGGLE: ${{ matrix.with_openssl.toggle }} | |
RUN_TESTS: ${{ env.run_tests }} | |
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ secrets.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }} | |
Windows: | |
needs: get-refs | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- cmake: Win32 | |
choco_options: '--forceX86 --x86 --version 1.1.1.2100 -y' | |
address_model: 32 | |
- cmake: x64 | |
choco_options: '' | |
address_model: 64 | |
build_type: | |
- Debug | |
- Release | |
shared_libs: | |
- toggle: OFF | |
name: Static | |
- toggle: ON | |
name: Shared | |
with_openssl: | |
- toggle: OFF | |
name: 'noSSL' | |
- toggle: ON | |
name: 'SSL' | |
runs-on: 'windows-latest' | |
env: | |
JOB_NAME: win_${{ matrix.arch.address_model }}_${{ matrix.build_type.short }}_${{ matrix.shared_libs.name }}_${{ matrix.with_openssl.name }} | |
name: win-${{ matrix.arch.address_model }}_${{ matrix.shared_libs.name }}_${{ matrix.with_openssl.name }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.get-refs.outputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: ./.github/actions/build-test/windows | |
with: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BOOST_VERSION: ${{ env.boost_version }} | |
THRIFT_VERSION: ${{ env.thrift_version }} | |
BUILD_TYPE: ${{ matrix.build_type }} | |
SHARED_LIBS_TOGGLE: ${{ matrix.shared_libs.toggle }} | |
OPENSSL_TOGGLE: ${{ matrix.with_openssl.toggle }} | |
ARCH_CHOCO_OPTIONS: ${{ matrix.arch.choco_options }} | |
ARCH_ADDRESS_MODEL: ${{ matrix.arch.address_model }} | |
ARCH_CMAKE: ${{ matrix.arch.cmake }} | |
INSTALL_BOOST: true | |
BOOST_URL: ${{ env.boost_url }} | |
BOOST_ARCHIVE_NAME: ${{ env.boost_archive_name }} | |
BOOST_FOLDER_NAME: ${{ env.boost_folder_name }} | |
BOOST_INCLUDE_FOLDER: ${{ env.boost_include_folder }} | |
INSTALL_THRIFT: true | |
RUN_TESTS: ${{ env.run_tests }} | |
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ secrets.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }} | |
macOS-x86_64: | |
needs: get-refs | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: | |
- type: Debug | |
warn_as_err: ON | |
- type: Release | |
warn_as_err: OFF | |
shared_libs: | |
- toggle: OFF | |
name: Static | |
- toggle: ON | |
name: Shared | |
with_openssl: | |
- toggle: OFF | |
name: 'noSSL' | |
- toggle: ON | |
name: 'SSL' | |
runs-on: macos-latest | |
name: macOS-(${{ matrix.build_type.type }}, ${{ matrix.shared_libs.name }}, ${{ matrix.with_openssl.name }}) | |
env: | |
OPENSSL_ROOT_DIR: /usr/local/opt/openssl/ | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.get-refs.outputs.ref }} | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: ./.github/actions/build-test/macos-x86_64 | |
with: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
BOOST_VERSION: ${{ env.boost_version }} | |
WARN_AS_ERR: ${{ matrix.build_type.warn_as_err }} | |
BUILD_TYPE: ${{ matrix.build_type.type }} | |
SHARED_LIBS_TOGGLE: ${{ matrix.shared_libs.toggle }} | |
OPENSSL_TOGGLE: ${{ matrix.with_openssl.toggle }} | |
RUN_TESTS: ${{ env.run_tests }} | |
HAZELCAST_ENTERPRISE_KEY: ${{ secrets.HAZELCAST_ENTERPRISE_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
HZ_TEST_AWS_INSTANCE_PRIVATE_IP: ${{ secrets.HZ_TEST_AWS_INSTANCE_PRIVATE_IP }} |