一旦 Ubuntu 24.04 x86_64 #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - "**.md" | |
| - "tests/**" | |
| branches-ignore: | |
| - "feature/e2e-test*" | |
| tags: | |
| - "*" | |
| schedule: | |
| # UTC の 01:00 は JST だと 10:00 。 | |
| # 1-5 で 月曜日から金曜日 | |
| - cron: "0 1 * * 1-5" | |
| permissions: | |
| contents: write | |
| env: | |
| OPENH264_VERSION: 2.6.0 | |
| jobs: | |
| # まず pyi を生成する | |
| # クロスコンパイル環境だと pyi が生成できないので、 | |
| # 1箇所で pyi を生成してアーティファクトにアップロードして、 | |
| # それを各ビルドで利用する形にする。 | |
| build_pyi: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| sudo apt-get -y install libx11-dev | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: false | |
| - run: uv python pin 3.13 | |
| - run: uv sync | |
| - name: Generate pyi | |
| run: | | |
| uv run python run.py ubuntu-24.04_x86_64 | |
| mkdir libdatachannel/ | |
| cp src/libdatachannel/py.typed libdatachannel/ | |
| cp src/libdatachannel/libdatachannel_ext.pyi libdatachannel/ | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libdatachannel | |
| path: libdatachannel/ | |
| build_ubuntu: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - name: ubuntu-24.04_x86_64 | |
| target: ubuntu-24.04_x86_64 | |
| runs_on: ubuntu-24.04 | |
| os: ubuntu | |
| # - name: ubuntu-22.04_x86_64 | |
| # target: ubuntu-22.04_x86_64 | |
| # runs_on: ubuntu-22.04 | |
| # os: ubuntu | |
| # arch: x86_64 | |
| python_version: | |
| # - "3.11" | |
| # - "3.12" | |
| - "3.13" | |
| needs: [build_pyi] | |
| runs-on: ${{ matrix.platform.runs_on }} | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: libdatachannel | |
| path: libdatachannel/ | |
| - run: | | |
| cp libdatachannel/py.typed src/libdatachannel/py.typed | |
| cp libdatachannel/libdatachannel_ext.pyi src/libdatachannel/libdatachannel_ext.pyi | |
| # libx11-dev は Ubuntu 24.04 の時に必要になる | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get -y install libx11-dev | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: false | |
| - run: | | |
| uv python pin ${{ matrix.python_version }} | |
| uv sync | |
| - run: | | |
| uv run python run.py ${{ matrix.platform.target }} | |
| uv run python -m build | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }} | |
| path: "dist/" | |
| slack_notify_failed: | |
| needs: [build_ubuntu] | |
| runs-on: ubuntu-24.04 | |
| if: failure() | |
| steps: | |
| - name: Slack Notification | |
| uses: rtCamp/action-slack-notify@v2 | |
| env: | |
| SLACK_CHANNEL: sora-python-sdk | |
| SLACK_COLOR: danger | |
| SLACK_TITLE: "FAILED" | |
| SLACK_ICON_EMOJI: ":japanese_ogre:" | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |