Skip to content

Commit

Permalink
build-debug.yml に統一する
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Nov 4, 2024
1 parent 01d0dda commit 8535aad
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 223 deletions.
56 changes: 35 additions & 21 deletions .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
required: true
type: number
defualt: 10
buildType:
required: true
type: choice
options:
- Debug
- RelWithDebInfo
default: Debug

env:
TEST_SIGNALING_URLS: ${{ secrets.TEST_SIGNALING_URLS }}
Expand Down Expand Up @@ -85,15 +92,15 @@ jobs:
id: webrtc-build-cache
with:
path: webrtc-build/_package/${{ matrix.platform.name }}/webrtc
key: webrtc-build-${{ matrix.platform.name }}-${{ steps.version.outputs.webrtc_build_version }}
key: webrtc-build-${{ inputs.buildType }}-${{ matrix.platform.name }}-${{ steps.version.outputs.webrtc_build_version }}
- uses: actions/checkout@v4
if: steps.webrtc-build-cache.outputs.cache-hit != 'true'
if: steps.webrtc-build-cache.outputs.cache-hit != 'true' && inputs.buildType == 'Debug'
with:
path: webrtc-build
repository: shiguredo-webrtc-build/webrtc-build
ref: ${{ steps.version.outputs.webrtc_build_version }}
- name: Setup libwebrtc
if: steps.webrtc-build-cache.outputs.cache-hit != 'true'
if: steps.webrtc-build-cache.outputs.cache-hit != 'true' && inputs.buildType == 'Debug'
run: |
sudo bash -c '
set -ex
Expand All @@ -118,23 +125,23 @@ jobs:
xz-utils
'
- name: Build libwebrtc
if: steps.webrtc-build-cache.outputs.cache-hit != 'true'
if: steps.webrtc-build-cache.outputs.cache-hit != 'true' && inputs.buildType == 'Debug'
working-directory: webrtc-build
run: |
python3 run.py build --debug ${{ matrix.platform.name }}
python3 run.py package --debug ${{ matrix.platform.name }}
python3 run.py build ${{ inputs.buildType == 'Debug' && '--debug' }} ${{ matrix.platform.name }}
python3 run.py package ${{ inputs.buildType == 'Debug' && '--debug' }} ${{ matrix.platform.name }}
# sora-cpp-sdk
- uses: actions/cache@v4
id: sora-cpp-sdk-cache
with:
path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/sora
path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}/sora
key: sora-cpp-sdk-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}
- uses: actions/cache@v4
id: boost-cache
with:
path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/boost
key: boost-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}
path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}/boost
key: boost-${{ inputs.buildType }}-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}
- uses: actions/checkout@v4
if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
with:
Expand Down Expand Up @@ -168,7 +175,7 @@ jobs:
sudo apt-get install -y software-properties-common
# X11
sudo apt-get install libx11-dev libxext-dev
sudo apt-get install -y libx11-dev libxext-dev
# CUDA
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
Expand All @@ -181,15 +188,21 @@ jobs:
# Intel Media SDK のために libva-dev, libdrm-dev を入れる
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install libva-dev libdrm-dev
- name: Copy libwebrtc to sora-cpp-sdk
if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true' && inputs.buildType == 'Debug'
run: |
mkdir -p sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug
cp -r webrtc-build/_package/${{ matrix.platform.name }}/webrtc sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/webrtc
echo ${{ steps.version.outputs.webrtc_build_version }} > sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/webrtc.version
mkdir -p sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}
cp -r webrtc-build/_package/${{ matrix.platform.name }}/webrtc sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}/webrtc
echo ${{ steps.version.outputs.webrtc_build_version }} > sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}/webrtc.version
- name: Build sora-cpp-sdk
if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
working-directory: sora-cpp-sdk
run: python3 run.py --debug ${{ matrix.platform.name }}
run: python3 run.py ${{ inputs.buildType == 'Debug' && '--debug' || '--relwithdebinfo' }} ${{ matrix.platform.name }}
- name: Teardown sora-cpp-sdk
if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true'
run: |
# CUDA が入ってると使おうとしてエラーになるのでアンインストールしておく
sudo apt-get remove -y cuda
sudo apt-get autoremove -y
# sora-python-sdk
- name: Setup sora-python-sdk
Expand All @@ -203,19 +216,20 @@ jobs:
mv libopenh264-2.4.1-linux64.7.so libopenh264.so
echo "OPENH264_PATH=`pwd`/libopenh264.so" >> $GITHUB_ENV
- name: Copy libwebrtc to sora-python-sdk
if: inputs.buildType == 'Debug'
run: |
mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/debug
mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}
cp -r webrtc-build/_package/${{ matrix.platform.name }}/webrtc sora-python-sdk/_install/${{ matrix.platform.name }}/webrtc
echo ${{ steps.version.outputs.webrtc_build_version }} > sora-python-sdk/_install/${{ matrix.platform.name }}/webrtc.version
- name: Copy sora-cpp-sdk to sora-python-sdk
run: |
mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/debug
cp -r sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/sora sora-python-sdk/_install/${{ matrix.platform.name }}/sora
mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}
cp -r sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}/sora sora-python-sdk/_install/${{ matrix.platform.name }}/sora
echo ${{ steps.version.outputs.sora_cpp_sdk_version }} > sora-python-sdk/_install/${{ matrix.platform.name }}/sora.version
- name: Copy boost to sora-python-sdk
run: |
mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/debug
cp -r sora-cpp-sdk/_install/${{ matrix.platform.name }}/debug/boost sora-python-sdk/_install/${{ matrix.platform.name }}/boost
mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}
cp -r sora-cpp-sdk/_install/${{ matrix.platform.name }}/${{ matrix.platform.name }}/${{ inputs.buildType == 'Debug' && 'debug' || 'release' }}/boost sora-python-sdk/_install/${{ matrix.platform.name }}/boost
echo ${{ steps.version.outputs.boost_version }} > sora-python-sdk/_install/${{ matrix.platform.name }}/boost.version
- uses: actions/cache@v4
id: llvm-cache
Expand All @@ -237,7 +251,7 @@ jobs:
set -x
uv python pin ${{ matrix.python.version }}
uv sync
uv run python run.py --debug ${{ matrix.platform.name }}
uv run python run.py ${{ inputs.buildType == 'Debug' && '--debug' || '--relwithdebinfo' }} ${{ matrix.platform.name }}
# cache
mkdir -p ../versions
cp _install/${{ matrix.platform.name }}/llvm.version ../versions
Expand Down
202 changes: 0 additions & 202 deletions .github/workflows/build-relwithdebinfo.yml

This file was deleted.

0 comments on commit 8535aad

Please sign in to comment.