Skip to content

Commit

Permalink
Merge branch 'develop' into feature/test-authz
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jan 8, 2025
2 parents 2efaba8 + 2fe229e commit b987641
Show file tree
Hide file tree
Showing 24 changed files with 447 additions and 270 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ jobs:
- 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
- uses: astral-sh/setup-uv@v5
- name: Build sora-python-sdk
working-directory: sora-python-sdk
run: |
Expand Down
81 changes: 44 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ jobs:
# 1箇所で pyi を生成してアーティファクトにアップロードして、
# それを各ビルドで利用する形にする。
build_pyi:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get -y install libva-dev libdrm-dev libx11-dev
- uses: astral-sh/setup-uv@v3
sudo apt-get -y install libx11-dev
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv python pin 3.13
- run: uv sync
- name: Generate pyi
run: |
uv run python run.py ubuntu-22.04_x86_64
uv run python run.py ubuntu-24.04_x86_64
mkdir sora_sdk/
cp src/sora_sdk/py.typed sora_sdk/
cp src/sora_sdk/sora_sdk_ext.pyi sora_sdk/
Expand All @@ -56,11 +58,11 @@ jobs:
runs_on: ubuntu-22.04
os: ubuntu
arch: x86_64
- name: macos-13_arm64
- name: macos-15_arm64
target: macos_arm64
runs_on: macos-13
runs_on: macos-15
os: macos
python_host_platform: "macosx-13.0-arm64"
python_host_platform: "macosx-15.0-arm64"
archflags: "-arch arm64"
- name: macos-14_arm64
target: macos_arm64
Expand Down Expand Up @@ -96,20 +98,22 @@ jobs:
# libx11-dev は Ubuntu 24.04 の時に必要になる模様
- run: |
sudo apt-get update
sudo apt-get -y install libva-dev libdrm-dev libx11-dev
sudo apt-get -y install libx11-dev
if: ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64' }}
- run: |
sudo apt-get -y install multistrap binutils-aarch64-linux-gnu
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
if: ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'armv8' }}
- uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync

# Ubuntu x86_64 向け
- name: Tailscale
uses: tailscale/github-action@v2
uses: tailscale/github-action@v3
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
Expand Down Expand Up @@ -176,7 +180,9 @@ jobs:
- run: |
cp sora_sdk/py.typed src/sora_sdk/py.typed
cp sora_sdk/sora_sdk_ext.pyi src/sora_sdk/sora_sdk_ext.pyi
- uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run python run.py windows_x86_64
Expand All @@ -188,22 +194,23 @@ jobs:
name: windows-2022_python-${{ matrix.python_version }}
path: dist/

slack_notify_succeeded:
needs: [build_linux_macos, build_windows]
runs-on: ubuntu-latest
if: success()
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: sora-python-sdk
SLACK_COLOR: good
SLACK_TITLE: SUCCEEDED
SLACK_ICON_EMOJI: ":star-struck:"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# slack_notify_succeeded:
# needs: [build_linux_macos, build_windows]
# runs-on: ubuntu-24.04
# if: success()
# steps:
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: sora-python-sdk
# SLACK_COLOR: good
# SLACK_TITLE: SUCCEEDED
# SLACK_ICON_EMOJI: ":star-struck:"
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

slack_notify_failed:
needs: [build_linux_macos, build_windows]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: failure()
steps:
- name: Slack Notification
Expand All @@ -226,8 +233,8 @@ jobs:
platform:
# - name: ubuntu-24.04_x86_64
- name: ubuntu-22.04_x86_64
- name: macos-15_arm64
- name: macos-14_arm64
- name: macos-13_arm64
- name: windows-2022
python_version:
- "3.10"
Expand All @@ -238,7 +245,7 @@ jobs:
- platform:
name: ubuntu-24.04_armv8
python_version: "3.12"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/download-artifact@v4
Expand All @@ -251,7 +258,7 @@ jobs:
fi
# matrix の中で1個だけソースディストリビューション用のデータを残しておく
- run: mv *.tar.gz dist/
if: ${{ matrix.platform.name == 'macos-14_arm64' && matrix.python_version == '3.10' }}
if: ${{ matrix.platform.name == 'macos-15_arm64' && matrix.python_version == '3.10' }}

# テスト用
# - name: Publish package to TestPyPI
Expand Down Expand Up @@ -280,7 +287,7 @@ jobs:
needs:
- build_linux_macos
- build_windows
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand All @@ -295,21 +302,21 @@ jobs:
- uses: ./.github/actions/download
with: { "platform": "ubuntu-24.04_armv8", "python_version": "3.12" }
- uses: ./.github/actions/download
with: { "platform": "macos-14_arm64", "python_version": "3.10" }
with: { "platform": "macos-15_arm64", "python_version": "3.10" }
- uses: ./.github/actions/download
with: { "platform": "macos-14_arm64", "python_version": "3.11" }
with: { "platform": "macos-15_arm64", "python_version": "3.11" }
- uses: ./.github/actions/download
with: { "platform": "macos-14_arm64", "python_version": "3.12" }
with: { "platform": "macos-15_arm64", "python_version": "3.12" }
- uses: ./.github/actions/download
with: { "platform": "macos-14_arm64", "python_version": "3.13" }
with: { "platform": "macos-15_arm64", "python_version": "3.13" }
- uses: ./.github/actions/download
with: { "platform": "macos-13_arm64", "python_version": "3.10" }
with: { "platform": "macos-14_arm64", "python_version": "3.10" }
- uses: ./.github/actions/download
with: { "platform": "macos-13_arm64", "python_version": "3.11" }
with: { "platform": "macos-14_arm64", "python_version": "3.11" }
- uses: ./.github/actions/download
with: { "platform": "macos-13_arm64", "python_version": "3.12" }
with: { "platform": "macos-14_arm64", "python_version": "3.12" }
- uses: ./.github/actions/download
with: { "platform": "macos-13_arm64", "python_version": "3.13" }
with: { "platform": "macos-14_arm64", "python_version": "3.13" }
- uses: ./.github/actions/download
with: { "platform": "windows-2022", "python_version": "3.10" }
- uses: ./.github/actions/download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
dependency-review:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
Expand Down
65 changes: 36 additions & 29 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
TEST_API_URL: ${{ secrets.TEST_API_URL }}
OPENH264_VERSION: 2.5.0

jobs:
e2e_test_ubuntu:
Expand All @@ -35,22 +36,24 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Tailscale
uses: tailscale/github-action@v2
uses: tailscale/github-action@v3
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
# libx11-dev は Ubuntu 24.04 の時に必要になる模様
- run: |
sudo apt-get update
sudo apt-get -y install libva2 libdrm2 libva-dev libdrm-dev libx11-dev portaudio19-dev
sudo apt-get -y install libva2 libdrm2 libx11-dev portaudio19-dev
- name: Download openh264
run: |
curl -LO http://ciscobinary.openh264.org/libopenh264-2.4.1-linux64.7.so.bz2
bzip2 -d libopenh264-2.4.1-linux64.7.so.bz2
mv libopenh264-2.4.1-linux64.7.so libopenh264.so
curl -LO http://ciscobinary.openh264.org/libopenh264-${{ env.OPENH264_VERSION }}-linux64.7.so.bz2
bzip2 -d libopenh264-${{ env.OPENH264_VERSION }}-linux64.7.so.bz2
mv libopenh264-${{ env.OPENH264_VERSION }}-linux64.7.so libopenh264.so
echo "OPENH264_PATH=$(pwd)/libopenh264.so" >> $GITHUB_ENV
- uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run python run.py ${{ matrix.os }}_x86_64
Expand All @@ -76,11 +79,13 @@ jobs:
- uses: actions/checkout@v4
- name: Download openh264
run: |
curl -LO http://ciscobinary.openh264.org/libopenh264-2.4.1-mac-arm64.dylib.bz2
bzip2 -d libopenh264-2.4.1-mac-arm64.dylib.bz2
mv libopenh264-2.4.1-mac-arm64.dylib libopenh264.dylib
curl -LO http://ciscobinary.openh264.org/libopenh264-${{ env.OPENH264_VERSION }}-mac-arm64.dylib.bz2
bzip2 -d libopenh264-${{ env.OPENH264_VERSION }}-mac-arm64.dylib.bz2
mv libopenh264-${{ env.OPENH264_VERSION }}-mac-arm64.dylib libopenh264.dylib
echo "OPENH264_PATH=$(pwd)/libopenh264.dylib" >> $GITHUB_ENV
- uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run python run.py macos_arm64
Expand Down Expand Up @@ -108,34 +113,36 @@ jobs:
- name: Download openh264
shell: pwsh
run: |
$url = "http://ciscobinary.openh264.org/openh264-2.4.1-win64.dll.bz2"
Invoke-WebRequest -Uri $url -OutFile "openh264-2.4.1-win64.dll.bz2"
7z e openh264-2.4.1-win64.dll.bz2
Rename-Item -Path "openh264-2.4.1-win64.dll" -NewName "libopenh264.dll"
$url = "http://ciscobinary.openh264.org/openh264-${{ env.OPENH264_VERSION }}-win64.dll.bz2"
Invoke-WebRequest -Uri $url -OutFile "openh264-${{ env.OPENH264_VERSION }}-win64.dll.bz2"
7z e openh264-${{ env.OPENH264_VERSION }}-win64.dll.bz2
Rename-Item -Path "openh264-${{ env.OPENH264_VERSION }}-win64.dll" -NewName "libopenh264.dll"
echo "OPENH264_PATH=$PWD\libopenh264.dll" >> $env:GITHUB_ENV
- uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run python run.py windows_x86_64
- run: uv run pytest tests -s

slack_notify_succeeded:
needs: [e2e_test_ubuntu, e2e_test_macos, e2e_test_windows]
runs-on: ubuntu-latest
if: success()
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: sora-python-sdk
SLACK_COLOR: good
SLACK_TITLE: SUCCEEDED
SLACK_ICON_EMOJI: ":star-struck:"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# slack_notify_succeeded:
# needs: [e2e_test_ubuntu, e2e_test_macos, e2e_test_windows]
# runs-on: ubuntu-24.04
# if: success()
# steps:
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: sora-python-sdk
# SLACK_COLOR: good
# SLACK_TITLE: SUCCEEDED
# SLACK_ICON_EMOJI: ":star-struck:"
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

slack_notify_failed:
needs: [e2e_test_ubuntu, e2e_test_macos, e2e_test_windows]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: failure()
steps:
- name: Slack Notification
Expand Down
32 changes: 26 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

## develop

- [CHANGE] macOS Sonoma 13 のサポートを終了する
- @voluntas
- [CHANGE] `client_cert``client_key` の指定にはパスではなく中身の文字列を指定するようにする
- C++ SDK 側の仕様変更に追従する
- @voluntas
Expand Down Expand Up @@ -48,23 +50,34 @@
- @melpon
- [ADD] Encoded Transform に対応する
- @tnoho
- [UPDATE] nanobind を `2.2.0` に上げる
- [UPDATE] nanobind を `2.4.0` に上げる
- @voluntas
- [UPDATE] Sora C++ SDK のバージョンを `2024.8.0` に上げる
- WEBRTC_BUILD_VERSION を `m129.6668.1.0` に上げる
- [UPDATE] Sora C++ SDK のバージョンを `2025.1.0` に上げる
- WEBRTC_BUILD_VERSION を `m132.6834.4.0` に上げる
- libwebrtc のモジュール分割に追従するため rtc::CreateRandomString のヘッダを追加
- CMAKE_VERSION を `3.30.3` に上げる
- BOOST_VERSION を `1.86.0` に上げる
- Sora CPP SDK の absl::optional を std::optional に変更した仕様に追従する
- Sora CPP SDK の absl::nullopt を std::nullopt に変更した仕様に追従する
- CMAKE_VERSION を `3.30.5` に上げる
- BOOST_VERSION を `1.87.0` に上げる
- OPENH264_VERSION を `v2.5.0` に上げる
- @torikizi @voluntas

### misc

- [ADD] macos-15 を E2E テストに追加する
- @voluntas
- [ADD] canary.py を追加
- @voluntas
- [ADD] Python 3.13 を E2E テストに追加する
- @voluntas
- [ADD] macos-15 を E2E テストに追加する
- @voluntas
- [UPDATE] ubuntu-latest を ubuntu-24.04 に変更する
- @voluntas
- [CHANGE] CI の Ubuntu から libva と libdrm をインストールしないようにする
- @voluntas
- [CHANGE] CMakefile の依存から libva と libdrm を削除する
- @voluntas
- [CHANGE] ruff と mypy と pytest はバージョンを未指定にして、常に最新版を利用するようにする
- @voluntas
- [CHANGE] 利用していなかった auditwheel を削除する
Expand All @@ -86,6 +99,13 @@
- @voluntas
- [ADD] examples に E2E テストを追加する
- @voluntas
- [FIX] サイマルキャストの E2E テストについて encoderImplementation の値チェック内容を緩和する
- サイマルキャストの encoderImplementation のチェックを文字列一致としていたが、帯域推定機能を有効にした後、値が安定しなくなったためチェック内容を緩和した
- サイマルキャストの encoderImplementation の結果を以下の通り修正
- "SimulcastEncoderAdapter (libaom, libaom, libaom)" -> "SimulcastEncoderAdapter" と "libaom" を含む
- "SimulcastEncoderAdapter (libvpx, libvpx, libvpx)" -> "SimulcastEncoderAdapter" と "libvpx" を含む
- "SimulcastEncoderAdapter (OpenH264, OpenH264, OpenH264)" -> "SimulcastEncoderAdapter" と "OpenH264" を含む
- "SimulcastEncoderAdapter (VideoToolbox, VideoToolbox, VideoToolbox)" -> "SimulcastEncoderAdapter" と "VideoToolbox" を含む

## 2024.3.0

Expand Down Expand Up @@ -152,7 +172,7 @@
- @enm10k
- [UPDATE] nanobind を `1.9.2` に上げて固定する
- @voluntas
- [UPDATE] ruff の最小を ``0.3.0` に上げる
- [UPDATE] ruff の最小を `0.3.0` に上げる
- @voluntas
- [UPDATE] Sora C++ SDK のバージョンを `2024.6.0` に上げる
- libwebrtc で `cricket::MediaEngineDependencies` が廃止された変更に追従する
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ find_package(nanobind CONFIG REQUIRED)
if(NOT TARGET_OS STREQUAL "windows")
find_package(Threads REQUIRED)
endif()
if(TARGET_OS STREQUAL "ubuntu" AND NOT CMAKE_CROSSCOMPILING)
find_package(Libva REQUIRED)
find_package(Libdrm REQUIRED)
endif()


nanobind_add_module(
Expand Down
Loading

0 comments on commit b987641

Please sign in to comment.