3333 - .github/workflows/**
3434 workflow_dispatch :
3535
36+ permissions :
37+ contents : read
38+
3639env :
3740 CARGO_TERM_COLOR : always
3841 # vcpkg binary caching for Windows
@@ -252,7 +255,7 @@ jobs:
252255 ./build.sh clean-all || true
253256 fi
254257
255- docker-build :
258+ docker-build-x64 :
256259 name : Build (docker-linux-x64)
257260 runs-on : ubuntu-latest
258261
@@ -267,9 +270,115 @@ jobs:
267270 uses : docker/setup-buildx-action@v3
268271
269272 - name : Build Docker image
270- run : docker build -t livekit-cpp-sdk:${{ github.sha }} . -f docker/Dockerfile
273+ run : |
274+ docker buildx build \
275+ --platform linux/amd64 \
276+ --load \
277+ -t livekit-cpp-sdk-x64:${{ github.sha }} \
278+ . \
279+ -f docker/Dockerfile
280+
281+ - name : Verify installed SDK inside image
282+ run : |
283+ docker run --rm livekit-cpp-sdk-x64:${{ github.sha }} bash -c \
284+ 'test -f /opt/livekit-sdk/lib/cmake/LiveKit/LiveKitConfig.cmake'
271285
272- - name : Build SDK inside Docker
286+ - name : Save Docker image artifact
287+ run : |
288+ docker save livekit-cpp-sdk-x64:${{ github.sha }} | gzip > livekit-cpp-sdk-x64.tar.gz
289+
290+ - name : Upload Docker image artifact
291+ uses : actions/upload-artifact@v4
292+ with :
293+ name : livekit-cpp-sdk-docker-x64
294+ path : livekit-cpp-sdk-x64.tar.gz
295+ retention-days : 7
296+
297+ docker-build-linux-arm64 :
298+ name : Build (docker-linux-arm64)
299+ runs-on : ubuntu-24.04-arm
300+
301+ steps :
302+ - name : Checkout (with submodules)
303+ uses : actions/checkout@v4
304+ with :
305+ submodules : recursive
306+ fetch-depth : 0
307+
308+ - name : Set up Docker Buildx
309+ uses : docker/setup-buildx-action@v3
310+
311+ - name : Build Docker image
312+ run : |
313+ docker buildx build \
314+ --platform linux/arm64 \
315+ --load \
316+ -t livekit-cpp-sdk:${{ github.sha }} \
317+ . \
318+ -f docker/Dockerfile
319+
320+ - name : Verify installed SDK inside image
273321 run : |
274322 docker run --rm livekit-cpp-sdk:${{ github.sha }} bash -c \
275- 'cd /client-sdk-cpp && chmod +x build.sh && ./build.sh release-examples'
323+ 'test -f /opt/livekit-sdk/lib/cmake/LiveKit/LiveKitConfig.cmake'
324+
325+ - name : Save Docker image artifact
326+ run : |
327+ docker save livekit-cpp-sdk:${{ github.sha }} | gzip > livekit-cpp-sdk-arm64.tar.gz
328+
329+ - name : Upload Docker image artifact
330+ uses : actions/upload-artifact@v4
331+ with :
332+ name : livekit-cpp-sdk-docker-arm64
333+ path : livekit-cpp-sdk-arm64.tar.gz
334+ retention-days : 7
335+
336+ build-collections-linux-arm64 :
337+ name : Build (cpp-example-collection-linux-arm64)
338+ runs-on : ubuntu-24.04-arm
339+ needs : docker-build-linux-arm64
340+
341+ steps :
342+ - name : Download Docker image artifact
343+ uses : actions/download-artifact@v4
344+ with :
345+ name : livekit-cpp-sdk-docker-arm64
346+
347+ - name : Load Docker image
348+ run : gzip -dc livekit-cpp-sdk-arm64.tar.gz | docker load
349+
350+ - name : Build cpp-example-collection against installed SDK
351+ run : |
352+ docker run --rm livekit-cpp-sdk:${{ github.sha }} bash -lc '
353+ set -euxo pipefail
354+ git clone https://github.com/livekit-examples/cpp-example-collection.git /tmp/cpp-example-collection
355+ cd /tmp/cpp-example-collection
356+ git checkout sderosa/examples-migration
357+ cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR=/opt/livekit-sdk
358+ cmake --build build --parallel
359+ '
360+
361+ build-collections-x64 :
362+ name : Build (cpp-example-collection-x64)
363+ runs-on : ubuntu-latest
364+ needs : docker-build-x64
365+
366+ steps :
367+ - name : Download Docker image artifact
368+ uses : actions/download-artifact@v4
369+ with :
370+ name : livekit-cpp-sdk-docker-x64
371+
372+ - name : Load Docker image
373+ run : gzip -dc livekit-cpp-sdk-x64.tar.gz | docker load
374+
375+ - name : Build cpp-example-collection against installed SDK
376+ run : |
377+ docker run --rm livekit-cpp-sdk-x64:${{ github.sha }} bash -lc '
378+ set -euxo pipefail
379+ git clone https://github.com/livekit-examples/cpp-example-collection.git /tmp/cpp-example-collection
380+ cd /tmp/cpp-example-collection
381+ git checkout sderosa/examples-migration
382+ cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR=/opt/livekit-sdk
383+ cmake --build build --parallel
384+ '
0 commit comments