Skip to content
Merged
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
54 changes: 54 additions & 0 deletions .github/workflows/pxf-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,21 @@ jobs:
image: apache/incubator-cloudberry:cbdb-build-ubuntu22.04-latest
options: --user root
steps:
- name: Get month number
id: get-month
run: echo "month=$(/bin/date -u '+%Y-%m')" >> "$GITHUB_OUTPUT"

- name: Restore DEB cache
id: cache-deb
uses: actions/cache/restore@v4
with:
path: |
workspace/cloudberry-deb
workspace/cloudberry-source.tar.gz
key: cloudberry-deb-${{ runner.os }}-${{ steps.get-month.outputs.month }}

- name: Checkout Cloudberry source
if: steps.cache-deb.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: apache/cloudberry
Expand All @@ -61,22 +75,35 @@ jobs:
submodules: true

- name: Checkout PXF source (for build script)
if: steps.cache-deb.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
path: cloudberry-pxf

- name: Build Cloudberry DEB
if: steps.cache-deb.outputs.cache-hit != 'true'
run: |
export WORKSPACE=$PWD/workspace
export CLOUDBERRY_VERSION=99.0.0
export CLOUDBERRY_BUILD=1
bash cloudberry-pxf/ci/docker/pxf-cbdb-dev/ubuntu/script/build_cloudberry_deb.sh

- name: Package Cloudberry source
if: steps.cache-deb.outputs.cache-hit != 'true'
run: |
cd workspace
tar czf cloudberry-source.tar.gz cloudberry/

- name: Save DEB cache
# save cache from default branch only (this cache can be reused between PRs)
if: steps.cache-deb.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
uses: actions/cache/save@v4
with:
path: |
workspace/cloudberry-deb
workspace/cloudberry-source.tar.gz
key: cloudberry-deb-${{ runner.os }}-${{ steps.get-month.outputs.month }}

- name: Upload DEB artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -98,7 +125,21 @@ jobs:
image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
options: --user root
steps:
- name: Get month number
id: get-month
run: echo "month=$(/bin/date -u '+%Y-%m')" >> "$GITHUB_OUTPUT"

- name: Restore RPM cache
id: cache-rpm
uses: actions/cache/restore@v4
with:
path: |
workspace/cloudberry-rpm
workspace/cloudberry-source-rocky9.tar.gz
key: cloudberry-rpm-${{ runner.os }}-${{ steps.get-month.outputs.month }}

- name: Checkout Cloudberry source
if: steps.cache-rpm.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: apache/cloudberry
Expand All @@ -107,22 +148,35 @@ jobs:
submodules: true

- name: Checkout PXF source (for build script)
if: steps.cache-rpm.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
path: cloudberry-pxf

- name: Build Cloudberry RPM
if: steps.cache-rpm.outputs.cache-hit != 'true'
run: |
export WORKSPACE=$PWD/workspace
export CLOUDBERRY_VERSION=99.0.0
export CLOUDBERRY_BUILD=1
bash cloudberry-pxf/ci/docker/pxf-cbdb-dev/rocky9/script/build_cloudberry_rpm.sh

- name: Package Cloudberry source
if: steps.cache-rpm.outputs.cache-hit != 'true'
run: |
cd workspace
tar czf cloudberry-source-rocky9.tar.gz cloudberry/

- name: Save RPM cache
# save cache from default branch only (this cache can be reused between PRs)
if: steps.cache-rpm.outputs.cache-hit != 'true' && github.ref == 'refs/heads/main'
uses: actions/cache/save@v4
with:
path: |
workspace/cloudberry-rpm
workspace/cloudberry-source-rocky9.tar.gz
key: cloudberry-rpm-${{ runner.os }}-${{ steps.get-month.outputs.month }}

- name: Upload RPM artifact
uses: actions/upload-artifact@v4
with:
Expand Down
Loading