diff --git a/.github/workflows/build-relwithdebinfo.yml b/.github/workflows/build-relwithdebinfo.yml new file mode 100644 index 0000000..7e504d9 --- /dev/null +++ b/.github/workflows/build-relwithdebinfo.yml @@ -0,0 +1,190 @@ +name: build-relwithdebinfo + +on: + workflow_dispatch: + push: + paths-ignore: + - "examples/**" + - "**.md" + +env: + TEST_SIGNALING_URLS: ${{ secrets.TEST_SIGNALING_URLS }} + TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }} + TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }} + TEST_API_URL: ${{ secrets.TEST_API_URL }} + +jobs: + build-linux: + strategy: + fail-fast: false + matrix: + platform: + - name: ubuntu-24.04_x86_64 + runs-on: ubuntu-24.04 + runs-on: ${{ matrix.platform.runs-on }} + steps: + - name: Disk Cleanup + run: | + set -x + df -h + # sudo du -h -d1 /usr/local + # sudo du -h -d1 /usr/local/share + # sudo du -h -d1 /usr/local/lib + # sudo du -h -d1 /usr/share + RMI=`docker images -q -a` + if [ -n "$RMI" ]; then + docker rmi $RMI + fi + # 4.6G + sudo rm -rf /usr/local/.ghcup + # 1.7G + sudo rm -rf /usr/share/swift + # 1.4G + sudo rm -rf /usr/share/dotnet + # 13G + sudo rm -rf /usr/local/lib/android + df -h + - name: Get stats + run: | + set -x + cat /etc/lsb-release + uname -a + cat /proc/cpuinfo + cat /proc/meminfo + - name: Setup Git User + run: | + git config --global user.name "${{ github.actor }}" + git config --global user.email "${{ github.actor }}@users.noreply.github.com" + + - name: Setup common + run: | + # clang-18 + wget https://apt.llvm.org/llvm.sh + chmod a+x llvm.sh + sudo ./llvm.sh 18 + + - uses: actions/checkout@v4 + with: + path: sora-python-sdk + - name: Get versions + id: version + run: | + source sora-python-sdk/VERSION + echo "webrtc_build_version=${WEBRTC_BUILD_VERSION}" >> $GITHUB_OUTPUT + echo "sora_cpp_sdk_version=${SORA_CPP_SDK_VERSION}" >> $GITHUB_OUTPUT + echo "boost_version=${BOOST_VERSION}" >> $GITHUB_OUTPUT + + # sora-cpp-sdk + - uses: actions/cache@v4 + id: sora-cpp-sdk-cache + with: + path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/release/sora + key: sora-cpp-sdk-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}-relwithdebinfo + - uses: actions/cache@v4 + id: boost-cache + with: + path: sora-cpp-sdk/_install/${{ matrix.platform.name }}/release/boost + key: boost-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk_version }}-relwithdebinfo + - uses: actions/checkout@v4 + if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true' + with: + path: sora-cpp-sdk + repository: shiguredo/sora-cpp-sdk + ref: ${{ steps.version.outputs.sora_cpp_sdk_version }} + # Ubuntu 24.04 だと libtinfo5 が見つからない問題があるので、その修正 + # ref: https://qiita.com/gengen16k/items/88cf3c18a40a94205fab + - name: Fix CUDA issues for Ubuntu 24.04 + if: steps.sora-cpp-sdk-cache.outputs.cache-hit != 'true' && matrix.platform.name == 'ubuntu-24.04_x86_64' + run: | + sudo tee /etc/apt/sources.list.d/jammy.list << EOF + deb http://archive.ubuntu.com/ubuntu/ jammy universe + EOF + + sudo tee /etc/apt/preferences.d/pin-jammy <> $GITHUB_ENV + - name: Copy sora-cpp-sdk to sora-python-sdk + run: | + mkdir -p sora-python-sdk/_install/${{ matrix.platform.name }}/release + cp -r sora-cpp-sdk/_install/${{ matrix.platform.name }}/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 }}/release + cp -r sora-cpp-sdk/_install/${{ matrix.platform.name }}/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 + with: + path: sora-python-sdk/_install/${{ matrix.platform.name }}/llvm + key: llvm-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk }} + - uses: actions/cache@v4 + id: version-file-cache + with: + path: versions + key: versions-${{ matrix.platform.name }}-${{ steps.version.outputs.sora_cpp_sdk }} + - name: Copy version file + if: steps.version-file-cache.outputs.cache-hit == 'true' + run: cp versions/llvm.version sora-python-sdk/_install/${{ matrix.platform.name }}/ + - uses: astral-sh/setup-uv@v3 + - name: Build sora-python-sdk + working-directory: sora-python-sdk + run: | + set -x + # uv python pin ${{ matrix.python_version }} + uv sync + uv run python run.py --relwithdebinfo ${{ matrix.platform.name }} + # cache + mkdir -p ../versions + cp _install/${{ matrix.platform.name }}/llvm.version ../versions + - name: E2E Test sora-python-sdk + working-directory: sora-python-sdk + run: | + for i in {1..10}; do + echo "---------------- $i 回目 ----------------" + sleep 10 + lldb-18 --batch -o 'command script import test_with_llvm.py' -o 'test' + done