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
27 changes: 20 additions & 7 deletions .github/workflows/ci-build-binary-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

package-linux:
name: Build ${{matrix.pkg.name}} ${{matrix.cpu.platform}}
runs-on: ubuntu-22.04
runs-on: ${{matrix.cpu.runner}}
timeout-minutes: 500

strategy:
Expand All @@ -42,15 +42,20 @@ jobs:
- { name: 'Deb', type: 'deb', path: 'pkg/deb/BUILD/DEB' }
- { name: 'Alpine', type: 'apk', path: 'pkg/apk/build' }
cpu:
- { arch: 'x86_64', platform: 'x86_64' }
- { arch: 'aarch64', platform: 'arm64' }
- { arch: 'x86_64', platform: 'x86_64', runner: 'ubuntu-22.04' }
- { arch: 'aarch64', platform: 'arm64', runner: 'ubuntu-22.04-arm' }

steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a
- name: Restore vcpkg binary cache
uses: actions/cache@v4
with:
path: ~/.cache/vcpkg/archives
key: vcpkg-linux-${{matrix.pkg.type}}-${{matrix.cpu.platform}}-${{hashFiles('vcpkg.json')}}
restore-keys: |
vcpkg-linux-${{matrix.pkg.type}}-${{matrix.cpu.platform}}-

- name: Package Pulsar source
run: build-support/generate-source-archive.sh
Expand All @@ -65,8 +70,8 @@ jobs:
tags: build:latest
platforms: linux/${{matrix.cpu.platform}}
build-args: PLATFORM=${{matrix.cpu.arch}}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=${{matrix.pkg.type}}-${{matrix.cpu.platform}}
cache-to: type=gha,mode=max,scope=${{matrix.pkg.type}}-${{matrix.cpu.platform}}

- name: Build packages
run: pkg/${{matrix.pkg.type}}/docker-build-${{matrix.pkg.type}}-${{matrix.cpu.platform}}.sh build:latest
Expand Down Expand Up @@ -211,6 +216,14 @@ jobs:
fetch-depth: 0
submodules: recursive

- name: Restore vcpkg binary cache
uses: actions/cache@v4
with:
path: ~/Library/Caches/vcpkg/archives
key: vcpkg-macos-${{ matrix.arch }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-macos-${{ matrix.arch }}-

- name: Install dependencies
run: |
export ARCH=${{ matrix.arch }}
Expand Down
2 changes: 1 addition & 1 deletion build-support/download-release-artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
for artifact in data['artifacts']:
name = artifact['name']
# Skip debug artifact
if name.endswith("-Debug"):
if name.endswith("-Debug") or name.find("dockerbuild") >= 0:
continue
dest_dir = os.path.join(dest_path, name)
if name.find("windows") >= 0 and os.path.exists(dest_dir + ".tar.gz"):
Expand Down
2 changes: 2 additions & 0 deletions pkg/apk/docker-build-apk-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

IMAGE_NAME=${1:-apachepulsar/pulsar-build:alpine-3.16-arm64}

mkdir -p $HOME/.cache/vcpkg/archives
docker run -v $ROOT_DIR:/pulsar-client-cpp \
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
--env PLATFORM=aarch64 \
$IMAGE_NAME \
/pulsar-client-cpp/pkg/apk/build-apk.sh
Expand Down
2 changes: 2 additions & 0 deletions pkg/apk/docker-build-apk-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

IMAGE_NAME=${1:-apachepulsar/pulsar-build:alpine-3.16-x86_64}

mkdir -p $HOME/.cache/vcpkg/archives
docker run -v $ROOT_DIR:/pulsar-client-cpp \
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
--env PLATFORM=x86_64 \
$IMAGE_NAME \
/pulsar-client-cpp/pkg/apk/build-apk.sh
Expand Down
2 changes: 2 additions & 0 deletions pkg/deb/docker-build-deb-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

IMAGE_NAME=${1:-apachepulsar/pulsar-build:debian-9-2.11-arm64}

mkdir -p $HOME/.cache/vcpkg/archives
docker run -v $ROOT_DIR:/pulsar-client-cpp \
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
--env PLATFORM=arm64 \
$IMAGE_NAME \
/pulsar-client-cpp/pkg/deb/build-deb.sh \
Expand Down
2 changes: 2 additions & 0 deletions pkg/deb/docker-build-deb-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

IMAGE_NAME=${1:-apachepulsar/pulsar-build:debian-9-2.11-x86_64}

mkdir -p $HOME/.cache/vcpkg/archives
docker run -v $ROOT_DIR:/pulsar-client-cpp \
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
--env PLATFORM=amd64 \
$IMAGE_NAME \
/pulsar-client-cpp/pkg/deb/build-deb.sh \
Expand Down
2 changes: 2 additions & 0 deletions pkg/rpm/docker-build-rpm-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

IMAGE_NAME=${1:-apachepulsar/pulsar-build:centos-7-2.11-arm64}

mkdir -p $HOME/.cache/vcpkg/archives
docker run -v $ROOT_DIR:/pulsar-client-cpp \
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
--env PLATFORM=aarch64 \
$IMAGE_NAME \
/pulsar-client-cpp/pkg/rpm/build-rpm.sh
2 changes: 2 additions & 0 deletions pkg/rpm/docker-build-rpm-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)

IMAGE_NAME=${1:-apachepulsar/pulsar-build:centos-7-2.11-x86_64}

mkdir -p $HOME/.cache/vcpkg/archives
docker run -v $ROOT_DIR:/pulsar-client-cpp \
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
--env PLATFORM=x86_64 \
$IMAGE_NAME \
/pulsar-client-cpp/pkg/rpm/build-rpm.sh
Loading