Skip to content

Commit a5799c6

Browse files
fix the problem that LiveKitTargets.cmake is still missing (#31)
1 parent 7c27da8 commit a5799c6

File tree

1 file changed

+13
-34
lines changed

1 file changed

+13
-34
lines changed

.github/workflows/make-release.yml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -125,52 +125,31 @@ jobs:
125125
shell: bash
126126
run: |
127127
chmod +x build.sh
128-
./build.sh release-examples
129-
130-
# Create bundle directory with version in name
131-
bundleDir="sdk-out/livekit-sdk-${{ matrix.name }}-${{ steps.version.outputs.version }}"
132-
mkdir -p "$bundleDir/lib"
133-
mkdir -p "$bundleDir/include"
134-
mkdir -p "$bundleDir/lib/cmake/LiveKit"
135-
136-
# Copy libs + headers (SDK)
137-
cp -r build-release/lib/* "$bundleDir/lib/" 2>/dev/null || true
138-
cp -r build-release/include/* "$bundleDir/include/" 2>/dev/null || true
128+
version="${{ steps.version.outputs.version }}"
129+
bundleDir="sdk-out/livekit-sdk-${{ matrix.name }}-${version}"
139130
140-
# Copy generated CMake package files
141-
cp -f build-release/LiveKitConfig.cmake "$bundleDir/lib/cmake/LiveKit/" || true
142-
cp -f build-release/LiveKitConfigVersion.cmake "$bundleDir/lib/cmake/LiveKit/" || true
143-
cp -f build-release/LiveKitTargets.cmake "$bundleDir/lib/cmake/LiveKit/" || true
144-
cp -f build-release/LiveKitTargets-*.cmake "$bundleDir/lib/cmake/LiveKit/" 2>/dev/null || true
131+
./build.sh release-examples --bundle --prefix "$bundleDir"
145132
146133
# List bundle contents
147134
echo "Bundle contents:"
148-
find "$bundleDir" -type f | head -80
135+
find "$bundleDir" -type f | head -120
149136
150137
# ---------- Build + Bundle (Windows) ----------
151138
- name: Build and Bundle (Windows)
152139
if: runner.os == 'Windows'
153140
shell: pwsh
154141
run: |
155-
# Build release with examples
156142
.\build.cmd release-examples
157-
158-
# Create bundle directory with version in name
159-
$bundleDir = "sdk-out/livekit-sdk-${{ matrix.name }}-${{ steps.version.outputs.version }}"
160-
New-Item -ItemType Directory -Force -Path $bundleDir | Out-Null
161-
New-Item -ItemType Directory -Force -Path "$bundleDir/lib" | Out-Null
162-
New-Item -ItemType Directory -Force -Path "$bundleDir/include" | Out-Null
163-
New-Item -ItemType Directory -Force -Path "$bundleDir/lib/cmake/LiveKit" | Out-Null
164-
165-
# Copy libs + headers (SDK)
166-
Copy-Item -Recurse -Force "build-release/lib/*" "$bundleDir/lib/"
167-
Copy-Item -Recurse -Force "build-release/include/*" "$bundleDir/include/"
168143
169-
# Copy generated CMake package files (best-effort)
170-
Copy-Item -Force "build-release/LiveKitConfig.cmake" "$bundleDir/lib/cmake/LiveKit/" -ErrorAction SilentlyContinue
171-
Copy-Item -Force "build-release/LiveKitConfigVersion.cmake" "$bundleDir/lib/cmake/LiveKit/" -ErrorAction SilentlyContinue
172-
Copy-Item -Force "build-release/LiveKitTargets.cmake" "$bundleDir/lib/cmake/LiveKit/" -ErrorAction SilentlyContinue
173-
Copy-Item -Force "build-release/LiveKitTargets-*.cmake" "$bundleDir/lib/cmake/LiveKit/" -ErrorAction SilentlyContinue
144+
$version = "${{ steps.version.outputs.version }}"
145+
$bundleDir = "sdk-out/livekit-sdk-${{ matrix.name }}-$version"
146+
147+
# There is the missing step that generates LiveKitTargets.cmake in the install tree
148+
# TODO(sxian): fix it after getting access to a windows machine
149+
cmake --install "build-release" --config Release --prefix "$bundleDir"
150+
151+
Write-Host "Bundle contents:"
152+
Get-ChildItem -Recurse -File $bundleDir | Select-Object -First 200 | ForEach-Object { $_.FullName }
174153
175154
# ---------- Upload artifact (raw directory, no pre-compression) ----------
176155
- name: Upload build artifact

0 commit comments

Comments
 (0)