-
Notifications
You must be signed in to change notification settings - Fork 2
131 lines (114 loc) · 6.35 KB
/
gen-doc-and-release.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: gen-doc-and-release
on:
push:
branches: [main]
workflow_dispatch:
branches: [main]
jobs:
build-gen-doc-and-release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Generate Version Output
id: generate_version_output
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Print Version Information
run: echo "Version ${{ steps.generate_version_output.outputs.version }}"
- name: Install system dependencies (Linux)
run: |
sudo apt update
sudo apt install ninja-build cmake build-essential libssl-dev libboost-all-dev
sudo apt install libglib2.0-dev libgtk-3-dev libpulse-dev libasound2-dev tree perl
sudo apt install libopencv-dev
sudo apt install libunwind-dev
sudo apt install doxygen
- name: Install python dependencies
run: |
python -m pip install --user --upgrade pip
python -m pip install --user --upgrade setuptools wheel
python -m pip install --user --upgrade twine
python -m pip install --user --upgrade pytest
python -m pip install --user --upgrade sphinx
python -m pip install --user --upgrade pybind11-stubgen
python -m pip install --user --upgrade numpy
python -m pip install --user -r signaling-server/requirements.txt
- name: Generate C++ Documentation
working-directory: doc/cpp
run: |
export OPENTERA_WEBRTC_VERSION=${{ steps.generate_version_output.outputs.version }}
doxygen
- name: Generate JavaScript Documentation
working-directory: doc/js
run: |
export OPENTERA_WEBRTC_VERSION=${{ steps.generate_version_output.outputs.version }}
doxygen
- name: Create build directory
run: |
mkdir build
- name: Run CMake and build opentera-webrtc
working-directory: build
run: |
cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=dist \
-DOPENTERA_WEBRTC_NATIVE_CLIENT_PYTHON_PIP_INSTALL_PREFIX='--user' \
-DOPENTERA_WEBRTC_NATIVE_CLIENT_PYTHON_VERSION="$(python3 --version | perl -pe 's/Python //')" \
-DOPENTERA_WEBRTC_USE_SYSTEM_OPENCV=ON
cmake --build . --target native_client-html-target
cmake --build . --target signaling_server-dist-target
- name: Copy Python Documentation to Doc Folder
run: |
mkdir -p doc/python
cp -r build/opentera-webrtc-native-client/OpenteraWebrtcNativeClient/python/package/opentera_webrtc_native_client/_build/* doc/python
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: doc
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ steps.generate_version_output.outputs.version }}
release_name: opentera-webrtc-${{ steps.generate_version_output.outputs.version }}
body: |
Latest build of opentera-webrtc v${{ steps.generate_version_output.outputs.version }}
- Please see API documentation at https://introlab.github.io/opentera-webrtc
draft: false
prerelease: false
- name: Create opentera-webrtc-web-client package archive
working-directory: opentera-webrtc-web-client
run: tar -czvf opentera-webrtc-web-client-${{ steps.generate_version_output.outputs.version }}.tar.gz package.json index.js webpack.config.js README.md src
- name: Upload opentera-webrtc-web-client NPM package
id: upload-release-npm-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./opentera-webrtc-web-client/opentera-webrtc-web-client-${{ steps.generate_version_output.outputs.version }}.tar.gz
asset_name: opentera-webrtc-web-client-${{ steps.generate_version_output.outputs.version }}.tar.gz
asset_content_type: application/gzip
- name: Upload opentera-webrtc-signaling-server Python wheel
id: upload-release-wheel-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/signaling-server/opentera_webrtc_signaling_server/dist/opentera_webrtc_signaling_server-${{ steps.generate_version_output.outputs.version }}-py3-none-any.whl
asset_name: opentera-webrtc-signaling-server-${{ steps.generate_version_output.outputs.version }}-py3-none-any.whl
asset_content_type: application/zip
- name: Upload opentera-webrtc-signaling-server Python sdist
id: upload-release-pysdist-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: build/signaling-server/opentera_webrtc_signaling_server/dist/opentera_webrtc_signaling_server-${{ steps.generate_version_output.outputs.version }}.tar.gz
asset_name: opentera-webrtc-signaling-server-${{ steps.generate_version_output.outputs.version }}.tar.gz
asset_content_type: application/gzip