@@ -36,15 +36,17 @@ jobs:
3636 - name : Bootstrap vcpkg (Windows)
3737 if : startsWith(matrix.os, 'windows')
3838 run : |
39+ $env:VCPKG_ROOT = "$PWD\vcpkg"
3940 git clone https://github.com/microsoft/vcpkg.git "$env:VCPKG_ROOT"
40- $env:VCPKG_ROOT\bootstrap-vcpkg.bat
41+ & "$env:VCPKG_ROOT\bootstrap-vcpkg.bat"
42+ echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $env:GITHUB_ENV
4143 echo "VCPKG_INSTALLED_DIR=$env:VCPKG_ROOT\installed" >> $env:GITHUB_ENV
4244 shell : pwsh
4345
4446 - name : Install dependencies (Windows)
4547 if : startsWith(matrix.os, 'windows')
4648 run : |
47- $env:VCPKG_ROOT/ vcpkg.exe install libusb[core]:x64-windows sdl2[sdl2main] :x64-windows sdl2-ttf:x64-windows
49+ & " $env:VCPKG_ROOT\ vcpkg.exe" install libusb[core]:x64-windows sdl2:x64-windows sdl2-ttf:x64-windows
4850 shell : pwsh
4951
5052 - name : Install dependencies (Ubuntu)
@@ -59,34 +61,59 @@ jobs:
5961 brew update
6062 brew install libusb sdl2 sdl2_ttf
6163
62- - name : Configure CMake
64+ - name : Configure CMake (Windows)
65+ if : startsWith(matrix.os, 'windows')
66+ run : |
67+ cmake -B build -DRAYNEO_BUILD_EXAMPLES=ON -DRAYNEO_BUILD_OPENVR_DRIVER=OFF -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake"
68+ shell : pwsh
69+
70+ - name : Configure CMake (POSIX)
71+ if : matrix.os != 'windows-latest'
6372 run : |
64- cmake -B build -DRAYNEO_BUILD_EXAMPLES=ON -DRAYNEO_BUILD_OPENVR_DRIVER=OFF ${{ startsWith(matrix.os, 'windows') && '-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake' || '' }}
73+ cmake -B build -DRAYNEO_BUILD_EXAMPLES=ON -DRAYNEO_BUILD_OPENVR_DRIVER=OFF
6574 shell : bash
6675
67- - name : Build
76+ - name : Build (Windows)
77+ if : startsWith(matrix.os, 'windows')
6878 run : |
6979 cmake --build build --config ${{ matrix.build_type }} --target RayNeoSDK
7080 cmake --build build --config ${{ matrix.build_type }} --target RayNeoExample || true
7181 cmake --build build --config ${{ matrix.build_type }} --target RayNeoOrientationDemo || true
82+ shell : pwsh
83+
84+ - name : Build (POSIX)
85+ if : matrix.os != 'windows-latest'
86+ run : |
87+ cmake --build build --target RayNeoSDK --config ${{ matrix.build_type }}
88+ cmake --build build --target RayNeoExample --config ${{ matrix.build_type }} || true
89+ cmake --build build --target RayNeoOrientationDemo --config ${{ matrix.build_type }} || true
7290 shell : bash
7391
7492 - name : Package artifacts
7593 run : |
7694 mkdir -p package/include package/bin package/examples
77- cp -R include/rayneo package/include/
78- # Copy library
95+ if [ -d include ]; then
96+ cp -R include/. package/include/
97+ else
98+ echo "WARNING: include directory missing"
99+ fi
100+ # Copy library (handle multi vs single config)
79101 if [ "${{ matrix.os }}" = "windows-latest" ]; then
80- cp build/${{ matrix.build_type }}/RayNeoSDK.dll package/bin/ || true
81- cp build/${{ matrix.build_type }}/RayNeoSDK.lib package/bin/ || true
102+ cp build/${{ matrix.build_type }}/RayNeoSDK.dll package/bin/ || echo "Missing RayNeoSDK.dll"
103+ cp build/${{ matrix.build_type }}/RayNeoSDK.lib package/bin/ || echo "Missing RayNeoSDK.lib"
82104 elif [ "${{ matrix.os }}" = "macos-latest" ]; then
83- cp build/RayNeoSDK.dylib package/bin/ || true
105+ cp build/libRayNeoSDK.dylib package/bin/ || echo "Missing libRayNeoSDK.dylib"
106+ else
107+ cp build/libRayNeoSDK.so package/bin/ || echo "Missing libRayNeoSDK.so"
108+ fi
109+ # Copy examples (Windows uses config dirs; others direct)
110+ if [ "${{ matrix.os }}" = "windows-latest" ]; then
111+ cp build/examples/simple/${{ matrix.build_type }}/* package/examples/ 2>/dev/null || true
112+ cp build/examples/orientation_demo/${{ matrix.build_type }}/* package/examples/ 2>/dev/null || true
84113 else
85- cp build/libRayNeoSDK.so package/bin/ || true
114+ cp build/examples/simple/* package/examples/ 2>/dev/null || true
115+ cp build/examples/orientation_demo/* package/examples/ 2>/dev/null || true
86116 fi
87- # Copy examples if built
88- cp build/examples/simple/${{ matrix.build_type }}/* package/examples/ 2>/dev/null || true
89- cp build/examples/orientation_demo/${{ matrix.build_type }}/* package/examples/ 2>/dev/null || true
90117 tar -czf rayneo-sdk-${{ matrix.os }}.tar.gz package
91118 shell : bash
92119
0 commit comments