Fix warnings with GCC on Ubuntu 20.04 (#149) #46
This file contains 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: 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 |