-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (113 loc) · 3.83 KB
/
Copy pathbuilds.yml
File metadata and controls
133 lines (113 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Build examples against latest LiveKit SDK (via CMake)
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
env:
# Used by LiveKitSDK.cmake when VERSION=latest (it looks for env GITHUB_TOKEN by default)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux-x64
- os: macos-latest
name: macos-arm64
- os: windows-latest
name: windows-x64
name: Build (${{ matrix.name }})
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
# ---------- deps ----------
- name: Install deps (Ubuntu)
if: runner.os == 'Linux'
shell: bash
run: |
set -eux
sudo apt-get update
sudo apt-get install -y \
cmake ninja-build pkg-config \
protobuf-compiler libprotobuf-dev \
libssl-dev \
curl
- name: Install deps (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
set -eux
brew update
brew install cmake ninja protobuf
- name: Install deps (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install -y ninja
# curl is available on windows-latest; no need for jq/unzip since CMake does the download/extract.
# ---------- configure + build ----------
- name: Configure (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
set -eux
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
- name: Build (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
set -eux
cmake --build build --config Release
- name: Configure (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cmake --build build --config Release
# ---------- smoke test ----------
# LiveKitSDK.cmake typically extracts into: build/_deps/livekit-sdk/<bundle-root>
# We’ll locate the extracted SDK root robustly and set runtime env vars from it.
- name: Smoke test (Linux/macOS)
if: runner.os != 'Windows'
shell: bash
run: |
set -eux
sdk_root="$(ls -d build/_deps/livekit-sdk/* | head -n 1)"
echo "SDK root: ${sdk_root}"
ls -la "${sdk_root}/lib" || true
if [[ "$RUNNER_OS" == "Linux" ]]; then
export LD_LIBRARY_PATH="${sdk_root}/lib:${LD_LIBRARY_PATH:-}"
else
export DYLD_LIBRARY_PATH="${sdk_root}/lib:${DYLD_LIBRARY_PATH:-}"
fi
./build/basic_room --help || true
- name: Smoke test (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$sdkRoot = Get-ChildItem -Directory "build\_deps\livekit-sdk" | Select-Object -First 1
if (-not $sdkRoot) { throw "SDK root not found under build\_deps\livekit-sdk" }
Write-Host "SDK root: $($sdkRoot.FullName)"
# Prefer bin first; keep lib too (some packages put dlls in lib)
$env:PATH = "$($sdkRoot.FullName)\bin;$($sdkRoot.FullName)\lib;$env:PATH"
.\build\basic_room.exe --help 2>$null
# ---------- upload build output ----------
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: basic_room-${{ matrix.name }}
path: |
build/basic_room*
build/basic_room.exe
retention-days: 7