Skip to content

Commit 342ec7c

Browse files
committed
Fix release workflows
1 parent f2c0fec commit 342ec7c

8 files changed

Lines changed: 33 additions & 8 deletions

.github/workflows/ci-build-binary-artifacts.yaml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
package-linux:
3333
name: Build ${{matrix.pkg.name}} ${{matrix.cpu.platform}}
34-
runs-on: ubuntu-22.04
34+
runs-on: ${{matrix.cpu.runner}}
3535
timeout-minutes: 500
3636

3737
strategy:
@@ -42,15 +42,20 @@ jobs:
4242
- { name: 'Deb', type: 'deb', path: 'pkg/deb/BUILD/DEB' }
4343
- { name: 'Alpine', type: 'apk', path: 'pkg/apk/build' }
4444
cpu:
45-
- { arch: 'x86_64', platform: 'x86_64' }
46-
- { arch: 'aarch64', platform: 'arm64' }
45+
- { arch: 'x86_64', platform: 'x86_64', runner: 'ubuntu-22.04' }
46+
- { arch: 'aarch64', platform: 'arm64', runner: 'ubuntu-22.04-arm' }
4747

4848
steps:
4949
- name: checkout
5050
uses: actions/checkout@v3
5151

52-
- name: Set up QEMU
53-
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a
52+
- name: Restore vcpkg binary cache
53+
uses: actions/cache@v4
54+
with:
55+
path: ~/.cache/vcpkg/archives
56+
key: vcpkg-linux-${{matrix.pkg.type}}-${{matrix.cpu.platform}}-${{hashFiles('vcpkg.json')}}
57+
restore-keys: |
58+
vcpkg-linux-${{matrix.pkg.type}}-${{matrix.cpu.platform}}-
5459
5560
- name: Package Pulsar source
5661
run: build-support/generate-source-archive.sh
@@ -65,8 +70,8 @@ jobs:
6570
tags: build:latest
6671
platforms: linux/${{matrix.cpu.platform}}
6772
build-args: PLATFORM=${{matrix.cpu.arch}}
68-
cache-from: type=gha
69-
cache-to: type=gha,mode=max
73+
cache-from: type=gha,scope=${{matrix.pkg.type}}-${{matrix.cpu.platform}}
74+
cache-to: type=gha,mode=max,scope=${{matrix.pkg.type}}-${{matrix.cpu.platform}}
7075

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

219+
- name: Restore vcpkg binary cache
220+
uses: actions/cache@v4
221+
with:
222+
path: ~/Library/Caches/vcpkg/archives
223+
key: vcpkg-macos-${{ matrix.arch }}-${{ hashFiles('vcpkg.json') }}
224+
restore-keys: |
225+
vcpkg-macos-${{ matrix.arch }}-
226+
214227
- name: Install dependencies
215228
run: |
216229
export ARCH=${{ matrix.arch }}

build-support/download-release-artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
for artifact in data['artifacts']:
4848
name = artifact['name']
4949
# Skip debug artifact
50-
if name.endswith("-Debug"):
50+
if name.endswith("-Debug") or name.find("dockerbuild") >= 0:
5151
continue
5252
dest_dir = os.path.join(dest_path, name)
5353
if name.find("windows") >= 0 and os.path.exists(dest_dir + ".tar.gz"):

pkg/apk/docker-build-apk-arm64.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
2424

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

27+
mkdir -p $HOME/.cache/vcpkg/archives
2728
docker run -v $ROOT_DIR:/pulsar-client-cpp \
29+
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
2830
--env PLATFORM=aarch64 \
2931
$IMAGE_NAME \
3032
/pulsar-client-cpp/pkg/apk/build-apk.sh

pkg/apk/docker-build-apk-x86_64.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
2424

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

27+
mkdir -p $HOME/.cache/vcpkg/archives
2728
docker run -v $ROOT_DIR:/pulsar-client-cpp \
29+
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
2830
--env PLATFORM=x86_64 \
2931
$IMAGE_NAME \
3032
/pulsar-client-cpp/pkg/apk/build-apk.sh

pkg/deb/docker-build-deb-arm64.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
2424

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

27+
mkdir -p $HOME/.cache/vcpkg/archives
2728
docker run -v $ROOT_DIR:/pulsar-client-cpp \
29+
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
2830
--env PLATFORM=arm64 \
2931
$IMAGE_NAME \
3032
/pulsar-client-cpp/pkg/deb/build-deb.sh \

pkg/deb/docker-build-deb-x86_64.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
2424

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

27+
mkdir -p $HOME/.cache/vcpkg/archives
2728
docker run -v $ROOT_DIR:/pulsar-client-cpp \
29+
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
2830
--env PLATFORM=amd64 \
2931
$IMAGE_NAME \
3032
/pulsar-client-cpp/pkg/deb/build-deb.sh \

pkg/rpm/docker-build-rpm-arm64.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
2424

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

27+
mkdir -p $HOME/.cache/vcpkg/archives
2728
docker run -v $ROOT_DIR:/pulsar-client-cpp \
29+
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
2830
--env PLATFORM=aarch64 \
2931
$IMAGE_NAME \
3032
/pulsar-client-cpp/pkg/rpm/build-rpm.sh

pkg/rpm/docker-build-rpm-x86_64.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
2424

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

27+
mkdir -p $HOME/.cache/vcpkg/archives
2728
docker run -v $ROOT_DIR:/pulsar-client-cpp \
29+
-v $HOME/.cache/vcpkg/archives:/root/.cache/vcpkg/archives \
2830
--env PLATFORM=x86_64 \
2931
$IMAGE_NAME \
3032
/pulsar-client-cpp/pkg/rpm/build-rpm.sh

0 commit comments

Comments
 (0)