Skip to content

Commit 73b0dc9

Browse files
committed
デバッグビルドを作ってみる
1 parent 296714d commit 73b0dc9

File tree

1 file changed

+215
-0
lines changed

1 file changed

+215
-0
lines changed

.github/workflows/build-debug.yml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
name: build-debug
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths-ignore:
7+
- "examples/**"
8+
- "**.md"
9+
10+
env:
11+
TEST_SIGNALING_URLS: ${{ secrets.TEST_SIGNALING_URLS }}
12+
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
13+
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
14+
TEST_API_URL: ${{ secrets.TEST_API_URL }}
15+
16+
jobs:
17+
build-linux:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
platform:
22+
- name: ubuntu-24.04_x86_64
23+
runs-on: ubuntu-24.04
24+
runs-on: ${{ matrix.platform.runs-on }}
25+
steps:
26+
- name: Disk Cleanup
27+
run: |
28+
set -x
29+
df -h
30+
sudo du -h -d1 /usr/local
31+
sudo du -h -d1 /usr/local/share
32+
sudo du -h -d1 /usr/local/lib
33+
sudo du -h -d1 /usr/share
34+
RMI=`docker images -q -a`
35+
if [ -n "$RMI" ]; then
36+
docker rmi $RMI
37+
fi
38+
# 4.6G
39+
sudo rm -rf /usr/local/.ghcup
40+
# 1.7G
41+
sudo rm -rf /usr/share/swift
42+
# 1.4G
43+
sudo rm -rf /usr/share/dotnet
44+
# 13G
45+
sudo rm -rf /usr/local/lib/android
46+
df -h
47+
- name: Get stats
48+
run: |
49+
set -x
50+
cat /etc/lsb-release
51+
uname -a
52+
cat /proc/cpuinfo
53+
cat /proc/meminfo
54+
- name: Setup Git User
55+
run: |
56+
git config --global user.name "${{ github.actor }}"
57+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
58+
59+
- name: Setup common
60+
run: |
61+
# clang-18
62+
wget https://apt.llvm.org/llvm.sh
63+
chmod a+x llvm.sh
64+
sudo ./llvm.sh 18
65+
66+
- uses: actions/checkout@v4
67+
with:
68+
path: sora-python-sdk
69+
- name: Get versions
70+
id: version
71+
run: |
72+
source VERSION
73+
echo "webrtc_build_version=${WEBRTC_BUILD_VERSION}" >> $GITHUB_OUTPUT
74+
echo "sora_cpp_sdk_version=${SORA_CPP_SDK_VERSION}" >> $GITHUB_OUTPUT
75+
echo "boost_version=${BOOST_VERSION}" >> $GITHUB_OUTPUT
76+
77+
# libwebrtc
78+
- uses: actions/cache@v4
79+
id: webrtc-build-cache
80+
with:
81+
path: webrtc-build/_package/${{ matrix.platform.name }}/webrtc
82+
key: webrtc-build-${{ matrix.platform.name }}-${{ steps.version.outputs.webrtc_build_version }}
83+
- uses: actions/checkout@v4
84+
if: steps.webrtc-build-cache.outputs.cache-hit != 'true'
85+
with:
86+
path: webrtc-build
87+
repository: https://github.com/shiguredo-webrtc-build/webrtc-build.git
88+
ref: ${{ steps.version.outputs.webrtc_build_version }}
89+
- name: Setup libwebrtc
90+
if: steps.webrtc-build-cache.outputs.cache-hit != 'true'
91+
run: |
92+
set -x
93+
apt-get -y install tzdata
94+
echo 'Asia/Tokyo' > /etc/timezone
95+
dpkg-reconfigure -f noninteractive tzdata
96+
sudo env DEBIAN_FRONTEND=noninteractive apt-get -y install \
97+
binutils \
98+
git \
99+
locales \
100+
lsb-release \
101+
ninja-build \
102+
pkg-config \
103+
python3 \
104+
python3-setuptools \
105+
rsync \
106+
sudo \
107+
unzip \
108+
vim \
109+
wget \
110+
xz-utils
111+
- name: Build libwebrtc
112+
if: steps.webrtc-build-cache.outputs.cache-hit != 'true'
113+
working-directory: webrtc-build
114+
run: |
115+
python3 run.py build --debug ${{ matrix.platform.name }}
116+
python3 run.py package --debug ${{ matrix.platform.name }}
117+
118+
# # sora-cpp-sdk
119+
# - uses: actions/cache@v4
120+
# id: sora-cpp-sdk-cache
121+
# with:
122+
# path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/sora
123+
# key: sora-cpp-sdk-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}
124+
# - uses: actions/cache@v4
125+
# id: boost-cache
126+
# with:
127+
# path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/boost
128+
# key: boost-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}
129+
# - uses: actions/checkout@v4
130+
# if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
131+
# with:
132+
# path: sora-cpp-sdk
133+
# repository: https://github.com/shiguredo/sora-cpp-sdk.git
134+
# ref: ${{ steps.version.outputs.sora_cpp_sdk_version }}
135+
# - name: Setup sora-cpp-sdk
136+
# if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
137+
# working-directory: sora-cpp-sdk
138+
# run: |
139+
# source VERSION
140+
# sudo apt-get update
141+
# sudo apt-get install -y software-properties-common
142+
143+
# # X11
144+
# sudo apt-get install libx11-dev libxext-dev
145+
146+
# # CUDA
147+
# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
148+
# sudo dpkg -i cuda-keyring_*all.deb
149+
# sudo apt-get update
150+
# DEBIAN_FRONTEND=noninteractive sudo apt-get -y install cuda=$CUDA_VERSION
151+
152+
# # Intel Media SDK のために libva-dev, libdrm-dev を入れる
153+
# DEBIAN_FRONTEND=noninteractive sudo apt-get -y install libva-dev libdrm-dev
154+
# - name: Copy libwebrtc to sora-cpp-sdk
155+
# if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
156+
# run: |
157+
# mkdir -p sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug
158+
# cp -r webrtc-build/_package/${{ matrix.platform.name }}/webrtc sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/webrtc
159+
# echo ${{ steps.version.outputs.webrtc_build_version }} > sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/webrtc.version
160+
# - name: Build sora-cpp-sdk
161+
# if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
162+
# run: python3 run.py --debug ${{ matrix.platform.name }}
163+
164+
# # sora-python-sdk
165+
# - name: Setup sora-python-sdk
166+
# run: |
167+
# sudo apt-get update
168+
# sudo apt-get -y install libva2 libdrm2 libva-dev libdrm-dev libx11-dev portaudio19-dev
169+
170+
# # Download OpneH264
171+
# curl -LO http://ciscobinary.openh264.org/libopenh264-2.4.1-linux64.7.so.bz2
172+
# bzip2 -d libopenh264-2.4.1-linux64.7.so.bz2
173+
# mv libopenh264-2.4.1-linux64.7.so libopenh264.so
174+
# echo "OPENH264_PATH=`pwd`/libopenh264.so" >> $GITHUB_ENV
175+
# - name: Copy libwebrtc to sora-python-sdk
176+
# run: |
177+
# mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/debug
178+
# cp -r webrtc-build/_package/${{ matrix.platform.name }}/webrtc sora-python-sdk/_install/${{ matrix.platform.name }}/debug/webrtc
179+
# echo ${{ steps.version.outputs.webrtc_build_version }} > sora-python-sdk/_install/${{ matrix.platform.name }}/debug/webrtc.version
180+
# - name: Copy sora-cpp-sdk to sora-python-sdk
181+
# run: |
182+
# mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/debug
183+
# cp -r sora-cpp-sdk/_package/${{ matrix.platform.name }}/sora sora-python-sdk/_install/${{ matrix.platform.name }}/debug/sora
184+
# echo ${{ steps.version.outputs.sora_cpp_sdk_version }} > sora-python-sdk/_install/${{ matrix.platform.name }}/debug/sora.version
185+
# - name: Copy boost to sora-python-sdk
186+
# run: |
187+
# mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/debug
188+
# cp -r boost/_package/${{ matrix.platform.name }}/boost boost/_install/${{ matrix.platform.name }}/debug/boost
189+
# echo ${{ steps.version.outputs.boost_version }} > sora-python-sdk/_install/${{ matrix.platform.name }}/debug/boost.version
190+
# - uses: actions/cache@v4
191+
# id: llvm-cache
192+
# with:
193+
# path: sora-python-sdk/_package/${{ matrix.platform.name }}/llvm
194+
# key: llvm-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk }}
195+
# - uses: actions/cache@v4
196+
# id: version-file-cache
197+
# with:
198+
# path: versions
199+
# key: versions-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk }}
200+
# - run: cp versions/llvm.version sora-python-sdk/_install/${{ matrix.platform.name }}/debug/
201+
# - uses: astral-sh/setup-uv@v3
202+
# - name: Build sora-python-sdk
203+
# working-directory: sora-python-sdk
204+
# run: |
205+
# set -x
206+
# # uv python pin ${{ matrix.python_version }}
207+
# uv sync
208+
# uv run python run.py --debug ${{ matrix.platform.target }}
209+
# # cache
210+
# mkdir ../versions
211+
# cp _install/${{ matrix.platform.name }}/debug/llvm.version ../versions
212+
# - name: E2E Test sora-python-sdk
213+
# working-directory: sora-python-sdk
214+
# run: |
215+
# lldb-18 -o 'settings set target.process.follow-fork-mode child' -o run -o continue -o 'bt all' -o 'exit' -- uv run pytest tests -s

0 commit comments

Comments
 (0)