Skip to content

windows は一旦コメントアウト #14

windows は一旦コメントアウト

windows は一旦コメントアウト #14

Workflow file for this run

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
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
- name: ubuntu-24.04_armv8
target: ubuntu-24.04_armv8
runs_on: ubuntu-24.04-arm
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 }}
- run: |
uv run pytest
build_macos:
strategy:
fail-fast: false
matrix:
platform:
- name: macos-15_arm64
target: macos_arm64
runs_on: macos-15
os: macos
python_host_platform: "macosx-15.0-arm64"
archflags: "-arch arm64"
# - name: macos-14_arm64
# target: macos_arm64
# runs_on: macos-14
# os: macos
# python_host_platform: "macosx-14.0-arm64"
# archflags: "-arch arm64"
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
- uses: astral-sh/setup-uv@v6
with:
enable-cache: false
- run: |
uv python pin ${{ matrix.python_version }}
uv sync
uv run python run.py ${{ matrix.platform.target }}
env:
_PYTHON_HOST_PLATFORM: ${{ matrix.platform.python_host_platform }}
ARCHFLAGS: ${{ matrix.platform.archflags }}
- run: |
uv run pytest
# build_windows:
# needs: [build_pyi]
# runs-on: windows-2025
# timeout-minutes: 15
# strategy:
# fail-fast: false
# matrix:
# python_version:
# # - "3.11"
# # - "3.12"
# - "3.13"
# 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
# - uses: astral-sh/setup-uv@v6
# with:
# enable-cache: false
# - run: |
# uv python pin ${{ matrix.python_version }}
# uv sync
# uv run python run.py windows_x86_64
slack_notify_failed:
needs: [build_ubuntu, build_macos]
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 }}