git » sdk » commit 2ecc0db

Fix GitHub Actions by using the Debian SDK container

author Waqas Hussain
2026-09-19 21:46:13 UTC
committer Waqas Hussain
2026-09-19 21:46:13 UTC
parent 9a32bb6b8621053e99a96b61f1ec37eb69a46f99

Fix GitHub Actions by using the Debian SDK container

Build and test with the existing Debian container, then extract
the SDK outputs for the existing artifact uploads.

Install Playwright browsers after npm dependencies using the
project's local CLI so browser versions match the test runner.

.github/workflows/build.yml +11 -43
build-misc/Containerfile.image +1 -1

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0a5d340..8b5d29b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,58 +14,26 @@ jobs:
     steps:
     - uses: actions/checkout@v4
 
-    - name: System Dependencies
-      run: |
-        sudo sh -c 'echo deb https://www.deb-multimedia.org sid main non-free > /etc/apt/sources.list.d/dm.list'
-        sudo apt-get update -oAcquire::AllowInsecureRepositories=true
-        sudo apt-get install --allow-unauthenticated deb-multimedia-keyring
-        sudo apt-get update
-        sudo apt-get install -y haxe libstrophe-dev libopus-dev libdatachannel-dev libpcre2-dev libmbedtls-dev libsqlite3-dev
-        haxelib setup ~/haxe
-
-    - name: Cache haxelib
-      id: cache-npm
-      uses: actions/cache@v3
-      env:
-        cache-name: cache-haxelib
-      with:
-        path: ~/haxe
-        key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/build.yml') }}
-        restore-keys: |
-          ${{ runner.os }}-build-${{ env.cache-name }}-
-          ${{ runner.os }}-build-
-          ${{ runner.os }}-
-
-    - name: Haxe Dependencies
-      run: |
-        make hx-build-dep
-
-    - name: NPM Dependencies
-      run: |
-        cd npm
-        npm config set maxsockets 2
-        npm i
-
-    - name: Tests
-      run: make test
+    - name: Build and test
+      run: docker build -t borogove-sdk -f build-misc/Containerfile.image .
 
-    - name: Build
+    - name: Extract artifacts
       run: |
-        make -j$(nproc)
-        cd cpp && make clean
+        mkdir -p artifacts
+        docker run --rm -v "$PWD/artifacts:/output" borogove-sdk
 
     - name: libborogove Artifact
       uses: actions/upload-artifact@v4
       with:
         name: libborogove
         path: |
-          libborogove.so
-          libborogove.a
-          libborogove.batteriesincluded.so
-          cpp/borogove.h
+          artifacts/sdk/libborogove.so
+          artifacts/sdk/libborogove.a
+          artifacts/sdk/libborogove.batteriesincluded.so
+          artifacts/sdk/cpp/borogove.h
 
     - name: cpp Tarball
-      run: tar -cjf cpp.tar.gz cpp/
+      run: tar -C artifacts/sdk -cjf cpp.tar.gz cpp/
 
     - name: cpp Artifact
       uses: actions/upload-artifact@v4
@@ -75,7 +43,7 @@ jobs:
           cpp.tar.gz
 
     - name: NPM Tarball
-      run: tar -cjf npm.tar.gz npm/
+      run: tar -C artifacts/sdk -cjf npm.tar.gz npm/
 
     - name: JS Artifact
       uses: actions/upload-artifact@v4
diff --git a/build-misc/Containerfile.image b/build-misc/Containerfile.image
index 2204067..96b2543 100644
--- a/build-misc/Containerfile.image
+++ b/build-misc/Containerfile.image
@@ -71,7 +71,6 @@ RUN printf '#!/bin/bash\nexec /usr/local/bin/nodejs --tls-max-v1.2 "$@"' > /usr/
 	&& chmod a+x /usr/local/bin/node
 
 RUN rm /etc/apt/sources.list.d/dmo.sources
-RUN npx playwright install --with-deps
 
 COPY Makefile *.hxml /usr/src/sdk/
 
@@ -82,6 +81,7 @@ RUN make hx-build-dep
 COPY npm /usr/src/sdk/npm
 RUN cd npm && npm install
 RUN ln -s npm/node_modules node_modules
+RUN npx --no-install playwright install --with-deps
 
 COPY . /usr/src/sdk/
 RUN git fetch --tags