88
99jobs :
1010 build-linux :
11- name : Build Linux Release
11+ name : Build Linux ${{ matrix.arch }} Release
1212 # Use ubuntu-latest (currently 24.04) to build with modern toolchain
1313 # Bundle dependencies and test on multiple distros to ensure compatibility
14- runs-on : ubuntu-latest
14+ runs-on : ${{ matrix.runner }}
1515 timeout-minutes : 20
16+ strategy :
17+ matrix :
18+ include :
19+ - arch : x86_64
20+ runner : ubuntu-latest
21+ release_dir : linux-x86_64
22+ artifact_name : vsdf-linux-x86_64
23+ tar_name : vsdf-linux-x86_64.tar.gz
24+ - arch : arm64
25+ runner : ubuntu-24.04-arm
26+ release_dir : linux-arm64
27+ artifact_name : vsdf-linux-arm64
28+ tar_name : vsdf-linux-arm64.tar.gz
1629
1730 steps :
1831 - name : Checkout code
5669
5770 - name : Bundle dependencies and fix paths
5871 run : |
59- mkdir -p release/linux /libs
60- cp build/vsdf release/linux /
61- chmod +x release/linux /vsdf
72+ mkdir -p release/${{ matrix.release_dir }} /libs
73+ cp build/vsdf release/${{ matrix.release_dir }} /
74+ chmod +x release/${{ matrix.release_dir }} /vsdf
6275
6376 echo "Finding and copying non-system libraries..."
6477
@@ -69,39 +82,39 @@ jobs:
6982 if [ -f "$lib" ]; then
7083 libname=$(basename "$lib")
7184 echo " → Copying $libname"
72- cp "$lib" release/linux /libs/ 2>/dev/null || true
85+ cp "$lib" release/${{ matrix.release_dir }} /libs/ 2>/dev/null || true
7386 fi
7487 done
7588
76- BUNDLED_COUNT=$(ls release/linux /libs/*.so* 2>/dev/null | wc -l)
89+ BUNDLED_COUNT=$(ls release/${{ matrix.release_dir }} /libs/*.so* 2>/dev/null | wc -l)
7790 echo "Total libraries bundled: $BUNDLED_COUNT"
7891
7992 echo "Setting RPATH..."
8093 # Set RPATH on main binary to look in libs/ folder
81- patchelf --set-rpath '$ORIGIN/libs' release/linux /vsdf
94+ patchelf --set-rpath '$ORIGIN/libs' release/${{ matrix.release_dir }} /vsdf
8295
8396 # Fix RPATH for each bundled library
84- for lib in release/linux /libs/*.so*; do
97+ for lib in release/${{ matrix.release_dir }} /libs/*.so*; do
8598 [ -f "$lib" ] && patchelf --set-rpath '$ORIGIN' "$lib" 2>/dev/null || true
8699 done
87100
88101 echo "✓ Bundling complete"
89102 echo ""
90103 echo "📦 Binary info:"
91- file release/linux /vsdf
92- ls -lh release/linux /vsdf
104+ file release/${{ matrix.release_dir }} /vsdf
105+ ls -lh release/${{ matrix.release_dir }} /vsdf
93106 echo ""
94107 echo "🔗 RPATH configuration:"
95- patchelf --print-rpath release/linux /vsdf
108+ patchelf --print-rpath release/${{ matrix.release_dir }} /vsdf
96109 echo ""
97110 echo "📚 Bundled libraries:"
98- ls -lh release/linux /libs/
111+ ls -lh release/${{ matrix.release_dir }} /libs/
99112 echo ""
100113 echo "🔍 Binary dependencies after bundling:"
101- ldd release/linux /vsdf
114+ ldd release/${{ matrix.release_dir }} /vsdf
102115 echo ""
103116 echo "⚠️ Checking for missing dependencies:"
104- if ldd release/linux /vsdf | grep 'not found'; then
117+ if ldd release/${{ matrix.release_dir }} /vsdf | grep 'not found'; then
105118 echo "❌ ERROR: Missing dependencies found!"
106119 exit 1
107120 else
@@ -110,17 +123,17 @@ jobs:
110123
111124 - name : Package binary
112125 run : |
113- cp -r shaders release/linux /
114- cp README.md release/linux /
115- cp LICENSE release/linux /
126+ cp -r shaders release/${{ matrix.release_dir }} /
127+ cp README.md release/${{ matrix.release_dir }} /
128+ cp LICENSE release/${{ matrix.release_dir }} /
116129 cd release
117- tar -czf vsdf-linux-x86_64.tar.gz linux /
130+ tar -czf ${{ matrix.tar_name }} ${{ matrix.release_dir }} /
118131
119132 - name : Upload artifact
120133 uses : actions/upload-artifact@v4
121134 with :
122- name : vsdf-linux-x86_64
123- path : release/vsdf-linux-x86_64.tar.gz
135+ name : ${{ matrix.artifact_name }}
136+ path : release/${{ matrix.tar_name }}
124137
125138 test-linux-ubuntu-24 :
126139 name : Test on Ubuntu 24.04
@@ -139,7 +152,7 @@ jobs:
139152 - name : Extract binary
140153 run : |
141154 tar -xzf vsdf-linux-x86_64.tar.gz
142- cd linux
155+ cd linux-x86_64
143156 chmod +x vsdf
144157
145158 - name : Install runtime dependencies
@@ -152,22 +165,22 @@ jobs:
152165
153166 - name : Test version
154167 run : |
155- cd linux
168+ cd linux-x86_64
156169 echo "→ Testing --version..."
157170 ./vsdf --version
158171 echo "✓ --version works"
159172
160173 - name : Test 1-frame headless render
161174 run : |
162- cd linux
175+ cd linux-x86_64
163176 echo "→ Testing 1-frame headless render (requires Vulkan)..."
164177 xvfb-run -s '-screen 0 1024x768x24' \
165178 ./vsdf --toy shaders/testtoyshader.frag --frames 1 --headless --log-level info
166179 echo "✓ Headless render works"
167180
168181 - name : Test offline render
169182 run : |
170- cd linux
183+ cd linux-x86_64
171184 echo "→ Testing offline render (FFmpeg, requires Vulkan)..."
172185 xvfb-run -s '-screen 0 1024x768x24' \
173186 ./vsdf --toy shaders/testtoyshader.frag --frames 10 --ffmpeg-output out-test.mp4 --log-level info
@@ -196,7 +209,7 @@ jobs:
196209 - name : Extract binary
197210 run : |
198211 tar -xzf vsdf-linux-x86_64.tar.gz
199- cd linux
212+ cd linux-x86_64
200213 chmod +x vsdf
201214
202215 - name : Install runtime dependencies
@@ -209,7 +222,7 @@ jobs:
209222
210223 - name : Test version
211224 run : |
212- cd linux
225+ cd linux-x86_64
213226 echo "→ Testing --version..."
214227 ./vsdf --version
215228 echo "✓ --version works"
@@ -513,6 +526,7 @@ jobs:
513526 with :
514527 files : |
515528 artifacts/vsdf-linux-x86_64/vsdf-linux-x86_64.tar.gz
529+ artifacts/vsdf-linux-arm64/vsdf-linux-arm64.tar.gz
516530 artifacts/vsdf-macos-x86_64/vsdf-macos-x86_64.tar.gz
517531 artifacts/vsdf-macos-arm64/vsdf-macos-arm64.tar.gz
518532 artifacts/vsdf-windows-x86_64-disable_ffmpeg/vsdf-windows-x86_64-disable_ffmpeg.zip
0 commit comments