-
Notifications
You must be signed in to change notification settings - Fork 56
90 lines (78 loc) · 2.02 KB
/
build-rtc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build RTC
on:
push:
paths:
- livekit-rtc/**
pull_request:
paths:
- livekit-rtc/**
workflow_dispatch:
env:
PACKAGE_DIR: ./livekit-rtc
jobs:
build_wheels:
name: Build RTC wheels (${{ matrix.archs }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# wheels to build:
include:
- os: ubuntu-latest
archs: x86_64
- os: buildjet-4vcpu-ubuntu-2204-arm
archs: aarch64
- os: windows-latest
archs: AMD64 # ignore windows arm64 for now
- os: macos-latest
archs: x86_64 arm64
defaults:
run:
working-directory: ${{ env.PACKAGE_DIR }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
- name: Install cibuildwheel
run: python3 -m pip install cibuildwheel==2.15.0
- name: Build wheels
run: python3 -m cibuildwheel --output-dir dist
env:
CIBW_ARCHS: ${{ matrix.archs }}
- uses: actions/upload-artifact@v3
with:
name: rtc-release
path: livekit-rtc/dist/*.whl
make_sdist:
name: Make RTC sdist
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.PACKAGE_DIR }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
name: rtc-release
path: livekit-rtc/dist/*.tar.gz
publish:
name: Publish RTC release
needs: [build_wheels, make_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags/rtc-v')
steps:
- uses: actions/download-artifact@v3
with:
name: rtc-release
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}