Skip to content

Commit

Permalink
[ci] Move cpp-tests job inside Pulsar CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi committed Sep 12, 2022
1 parent c1434fd commit 77169ff
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 107 deletions.
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

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.

67 changes: 65 additions & 2 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ jobs:
uses: ./.github/actions/tune-runner-vm

- name: Cache Maven dependencies
if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
uses: actions/cache@v2
with:
path: |
Expand All @@ -157,6 +156,7 @@ jobs:
- name: build package
run: mvn -B clean package -DskipTests -T 1C -ntp


unit-tests:
name: CI - Unit - ${{ matrix.name }}
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -497,6 +497,68 @@ jobs:
run: |
gh-actions-artifact-client.js delete pulsar-java-test-image.zst
cpp-tests:
name:
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
run: |
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- 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
- 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 @@ -842,7 +904,8 @@ jobs:
'unit-tests',
'integration-tests',
'system-tests',
'macos-build'
'macos-build',
'cpp-tests'
]
if: always()
steps:
Expand Down

0 comments on commit 77169ff

Please sign in to comment.