Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ github:
# See ./github/workflows/README.md for more documentation on this list.
contexts:
- Pulsar CI checks completed
- cpp-tests
Comment thread
nicoloboschi marked this conversation as resolved.

required_pull_request_reviews:
dismiss_stale_reviews: false
Expand Down
104 changes: 0 additions & 104 deletions .github/workflows/ci-cpp.yaml

This file was deleted.

88 changes: 77 additions & 11 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ jobs:
$GITHUB_WORKSPACE/build/pulsar_ci_tool.sh store_tar_to_github_actions_artifacts pulsar-maven-repository-binaries \
tar --exclude '.m2/repository/org/apache/pulsar/pulsar-*-distribution' \
-I zstd -cf - .m2/repository/org/apache/pulsar
cd $GITHUB_WORKSPACE
$GITHUB_WORKSPACE/build/pulsar_ci_tool.sh store_tar_to_github_actions_artifacts pulsar-server-distribution \
tar -I zstd -cf - distribution/server/target/apache-pulsar-*-bin.tar.gz

- name: Wait for ssh connection when build fails
# ssh access is enabled for builds in own forks
Expand All @@ -125,7 +128,6 @@ jobs:
action: wait



unit-tests:
name: CI - Unit - ${{ matrix.name }}
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -466,6 +468,71 @@ jobs:
run: |
gh-actions-artifact-client.js delete pulsar-java-test-image.zst

cpp-tests:
name:
Comment thread
lhotari marked this conversation as resolved.
runs-on: ubuntu-20.04
timeout-minutes: 120
needs: [
'changed_files_job',
'integration-tests'
]
if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
steps:
- name: checkout
uses: actions/checkout@v2

- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/pulsar
key: ${{ runner.os }}-m2-dependencies-core-modules-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-dependencies-core-modules-

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17

- name: Clean Disk
uses: ./.github/actions/clean-disk

- name: Install gh-actions-artifact-client.js
uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master

- name: Restore maven build results from Github artifact cache
run: |
cd $HOME
$GITHUB_WORKSPACE/build/pulsar_ci_tool.sh restore_tar_from_github_actions_artifacts pulsar-maven-repository-binaries
cd $GITHUB_WORKSPACE
$GITHUB_WORKSPACE/build/pulsar_ci_tool.sh restore_tar_from_github_actions_artifacts pulsar-server-distribution

- name: copy python tests
run: |
mvn -B -Pskip-all -ntp -pl pulsar-functions/instance package

- name: build cpp artifacts
run: |
echo "Build C++ client library"
pulsar-client-cpp/docker-build.sh

- name: run c++ tests
run: pulsar-client-cpp/docker-tests.sh

- name: Upload test-logs
uses: actions/upload-artifact@v3
if: failure()
continue-on-error: true
with:
name: cpp-tests-logs
path: test-logs

pulsar-test-latest-version-image:
name: Build Pulsar docker image
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -822,7 +889,7 @@ jobs:
- name: Delete docker image from GitHub Actions Artifacts
run: |
gh-actions-artifact-client.js delete pulsar-test-latest-version-image.zst

macos-build:
name: Build Pulsar on MacOS
runs-on: macos-11
Expand Down Expand Up @@ -890,13 +957,9 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.jdk || '17' }}

- name: clean disk
run: |
sudo swapoff -a
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- name: Clean Disk
uses: ./.github/actions/clean-disk

- name: Install gh-actions-artifact-client.js
uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master

Expand Down Expand Up @@ -938,7 +1001,8 @@ jobs:
'integration-tests',
'system-tests',
'flaky-system-tests',
'macos-build'
'macos-build',
'cpp-tests'
]
steps:
- name: Check that all required jobs were completed successfully
Expand All @@ -949,6 +1013,7 @@ jobs:
&& "${{ needs.integration-tests.result }}" == "success" \
&& "${{ needs.system-tests.result }}" == "success" \
&& "${{ needs.macos-build.result }}" == "success" \
&& "${{ needs.cpp-tests.result }}" == "success" \
) ]]; then
echo "Required jobs haven't been completed successfully."
exit 1
Expand All @@ -969,4 +1034,5 @@ jobs:
- name: Delete maven repository binaries from GitHub Actions Artifacts
if: ${{ needs.changed_files_job.outputs.docs_only != 'true' }}
run: |
gh-actions-artifact-client.js delete pulsar-maven-repository-binaries.tar.zst
gh-actions-artifact-client.js delete pulsar-maven-repository-binaries.tar.zst || true
gh-actions-artifact-client.js delete pulsar-server-distribution.tar.zst || true
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pip3 install protobuf==3.20.1 --user
pip3 install fastavro --user

CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
PULSAR_HOME=$CUR_DIR/../../../../
PULSAR_HOME="$( cd "$CUR_DIR/../../../../" >/dev/null && pwd )"

# run instance tests
PULSAR_HOME=${PULSAR_HOME} PYTHONPATH=${PULSAR_HOME}/pulsar-functions/instance/target/python-instance python3 -m unittest discover -v ${PULSAR_HOME}/pulsar-functions/instance/target/python-instance/tests