Skip to content

Commit

Permalink
Upload web (#141)
Browse files Browse the repository at this point in the history
* Add the web client package to the release

* Add Python signaling server wheel/sdist to release

* Fix missing target

* Update some versions of actions used

* Make it official release

* Update aiohttp from 3.9.0 to 3.9.4

---------

Co-authored-by: philippewarren <philippewarren31@gmail.com>
  • Loading branch information
doumdi and philippewarren authored May 29, 2024
1 parent 0c445ac commit bef7e2d
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cpp-python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
enable-gstreamer: ON

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -106,10 +106,10 @@ jobs:
sudo apt-get install ninja-build cmake build-essential libssl-dev libboost-all-dev
sudo apt-get install libglib2.0-dev libgtk-3-dev libpulse-dev libasound2-dev tree perl
sudo apt install libunwind-dev
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev
sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
sudo apt-get install gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
sudo apt-get install gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev
sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
sudo apt-get install gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
sudo apt-get install gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5
sudo apt-get install gstreamer1.0-pulseaudio
if: runner.os == 'Linux'

Expand Down
50 changes: 43 additions & 7 deletions .github/workflows/gen-doc-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ on:
workflow_dispatch:
branches: [main]


jobs:
build-gen-doc-and-release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -42,7 +41,6 @@ jobs:
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: |
Expand All @@ -66,15 +64,16 @@ jobs:
-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
make -j2 native_client-html-target
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@3.7.1
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
Expand All @@ -87,9 +86,46 @@ jobs:
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-native-client-${{ steps.generate_version_output.outputs.version }}
release_name: opentera-webrtc-${{ steps.generate_version_output.outputs.version }}
body: |
Latest build of opentera-webrtc-native-client v${{ steps.generate_version_output.outputs.version }}
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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.3
1.1.4
1 change: 1 addition & 0 deletions signaling-server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set(SOURCE

opentera-signaling-server
README.md
requirements.txt
)
# Same relative tree between CMAKE_CURRENT_SOURCE_DIR and PYTHON_PACKAGE_DIR for files in SOURCE will work as expected with this command
pip_configure_package_file_hierarchy(${SOURCE})
Expand Down
2 changes: 1 addition & 1 deletion signaling-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
aiohttp==3.9.0
aiohttp==3.9.4
aiohttp_index==0.1
11 changes: 7 additions & 4 deletions signaling-server/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ def get_doc_files():
return list(files.items())


long_description = read_file("README.md")
LONG_DESCRIPTION = read_file("README.md")
REQUIREMENTS = read_file("requirements.txt").splitlines()
DATA_FILES = [('', ["requirements.txt"])]
$<IF:$<BOOL:${ENABLE_HTML_DOC}>,DATA_FILES.extend(get_doc_files()),>

setup(
name="opentera_webrtc_signaling_server",
version="${OPENTERA_WEBRTC_NATIVE_CLIENT_VERSION}",
author="Marc-Antoine Maheux, Cedric Godin, Dominic Letourneau",
author_email="marc-antoine.maheux@usherbrooke.ca, cedric.godin@usherbrooke.ca, dominic.letourneau@usherbrooke.ca",
description="OpenTera WebRTC Signaling Server",
long_description=long_description,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="https://github.com/introlab/opentera-webrtc",
packages=['opentera_webrtc.signaling_server'],
Expand All @@ -38,9 +41,9 @@ setup(
license="Apache Software License",
platforms=['linux_x86_64'],
python_requires='>=3.8',
$<IF:$<BOOL:${ENABLE_HTML_DOC}>,data_files=get_doc_files()$<COMMA>,>
data_files=DATA_FILES,
include_package_data=True,
zip_safe=False,
install_requires=["python-socketio", "aiohttp", "aiohttp_index"],
install_requires=REQUIREMENTS,
scripts=['opentera-signaling-server'],
)

0 comments on commit bef7e2d

Please sign in to comment.