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
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 }}
0 commit comments