Skip to content

Commit

Permalink
Finish GitHub Actions alterations
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Oct 21, 2023
1 parent cb6b2de commit 07ffd56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build_changed_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
changed_component_images:
runs-on: ubuntu-latest
outputs:
any_changed: steps.check.outputs.any_changed
any_deleted: steps.check.outputs.any_deleted
any_modified: steps.check.outputs.any_modified
strategy:
matrix:
include:
Expand Down Expand Up @@ -83,7 +82,7 @@ jobs:
files: ${{ matrix.source_files_for_diff }}

- name: Build & publish ${{ matrix.name }} image
if: steps.check.outputs.any_changed == 'true' || steps.check.outputs.any_deleted == 'true'
if: ${{ steps.check.outputs.any_modified == 'true' }}
uses: ./.github/actions/build_and_publish_image
with:
build_args: ${{ matrix.build_args }}
Expand Down Expand Up @@ -144,7 +143,7 @@ jobs:
files: ${{ matrix.source_files_for_diff }}

- name: Build & publish ${{ matrix.name }} image
if: steps.check.outputs.any_modified == 'true'
if: ${{ steps.check.outputs.any_modified == 'true' }}
uses: ./.github/actions/build_and_publish_image
with:
build_args: ${{ matrix.build_args }}
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ name: Publish release

on:
release:
types: [ created ]
types: [ published ]
workflow_dispatch:

jobs:
get_semver:
name: Get Semantic Version
runs-on: ubuntu-latest
outputs:
semver: ${{ steps.get.outputs.semver }}
Expand Down Expand Up @@ -141,7 +142,6 @@ jobs:
source_path: /opt/selkies-gstreamer-latest.tgz
target_directory: /tmp
target_name: selkies-gstreamer-${{ github.ref_name }}-ubuntu20.04.tgz
upload_bucket_path: gs://selkies-project-releases/selkies-gstreamer/${{ github.ref_name }}/

- id: gst22
description: Ubuntu 22.04
Expand All @@ -150,7 +150,6 @@ jobs:
source_path: /opt/selkies-gstreamer-latest.tgz
target_directory: /tmp
target_name: selkies-gstreamer-${{ github.ref_name }}-ubuntu22.04.tgz
upload_bucket_path: gs://selkies-project-releases/selkies-gstreamer/${{ github.ref_name }}/

- id: js20
description: JS Interposer Ubuntu 20.04
Expand All @@ -159,7 +158,6 @@ jobs:
source_path: /opt/selkies-js-interposer_${{ needs.get_semver.outputs.semver }}.deb
target_directory: /tmp
target_name: selkies-js-interposer-${{ github.ref_name }}-ubuntu20.04.deb
upload_bucket_path: gs://selkies-project-releases/selkies-gstreamer/${{ github.ref_name }}/

- id: js22
description: JS Interposer Ubuntu 22.04
Expand All @@ -168,7 +166,6 @@ jobs:
source_path: /opt/selkies-js-interposer_${{ needs.get_semver.outputs.semver }}.deb
target_directory: /tmp
target_name: selkies-js-interposer-${{ github.ref_name }}-ubuntu22.04.deb
upload_bucket_path: gs://selkies-project-releases/selkies-gstreamer/${{ github.ref_name }}/

- id: py
description: Python
Expand All @@ -177,7 +174,6 @@ jobs:
source_path: /opt/pypi/dist/selkies_gstreamer-${{ needs.get_semver.outputs.semver }}-py3-none-any.whl
target_directory: /tmp
target_name: selkies_gstreamer-${{ needs.get_semver.outputs.semver }}-py3-none-any.whl
upload_bucket_path: gs://selkies-project-releases/selkies-gstreamer/${{ github.ref_name }}/

- id: web
description: Web
Expand All @@ -186,19 +182,13 @@ jobs:
source_path: /opt/gst-web.tgz
target_directory: /tmp
target_name: selkies-gstreamer-web-${{ github.ref_name }}.tgz
upload_bucket_path: gs://selkies-project-releases/selkies-gstreamer/${{ github.ref_name }}/

name: ${{ matrix.description }} release artifact extraction & upload
steps:
- name: ${{ matrix.description }} release artifact extraction
id: extract
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
cat - > /tmp/sa_key.json <<EOF
${{ secrets.GCP_ACTIONS_SA_KEY }}
EOF
gcloud -q auth activate-service-account --key-file /tmp/sa_key.json
docker create --name copy "${{ matrix.image_tag }}"
TARGET_PATH="${{ matrix.target_directory }}/${{ matrix.target_name }}"
docker cp "copy:${{ matrix.source_path }}" "$TARGET_PATH"
Expand All @@ -208,11 +198,10 @@ jobs:
tar -zcvf "temp.tgz" "$SOURCE_DIRNAME" && rm -rf "$SOURCE_DIRNAME" && mv -f "temp.tgz" "$TARGET_PATH"
fi
docker rm copy
gsutil cp "$TARGET_PATH" "${{ matrix.upload_bucket_path }}"
- name: ${{ matrix.description }} release artifact upload
id: release
if: github.event_name == 'release'
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ Any [GStreamer](https://gstreamer.freedesktop.org) plugin [documentation page](h

### The HTML5 web interface is slow and laggy.

It's most likely something with your network. Ensure that the latency to your TURN server from the server and the client is ideally under 50 ms. If the latency is too high, your connection may be too laggy for any remote desktop application. Moreover, please try to use a wired connection over a wireless connection. Also note that a higher framerate will improve performance if you have the sufficient bandwidth. This is because one screen refresh from a 60 fps screen takes 16.67 ms at a time, while one screen refresh from a 15 fps screen inevitably takes 66.67 ms, and therefore inherently causes a visible lag. Also, note that if you saturate your CPU or GPU with an application on the host, the remote desktop interface will also substantially slow down as it cannot use the CPU or GPU enough to encode the screen.
First of all, it's most likely something with your network. Using wired ethernet or a good 5GHz WiFi connection is important. Ensure that the latency to your TURN server from the server and the client is ideally under 50 ms. If the latency is too high, your connection may be too laggy for any remote desktop application. Also note that a higher framerate will improve performance if you have the sufficient bandwidth. This is because one screen refresh from a 60 fps screen takes 16.67 ms at a time, while one screen refresh from a 15 fps screen inevitably takes 66.67 ms, and therefore inherently causes a visible lag. Also, note that if you saturate your CPU or GPU with an application on the host, the remote desktop interface will also substantially slow down as it cannot use the CPU or GPU enough to encode the screen.

However, it might be that the parameters for the encoders, WebRTC, RTSP, or other [GStreamer](https://gstreamer.freedesktop.org) plugins are not optimized enough. If you find that it is the case, we always welcome contributions. If your changes show noticeably better results in the same conditions, please make a [Pull Request](https://github.com/selkies-project/selkies-gstreamer/pulls), or tell us about the parameters in any channel that we can reach so that we can also test.
However, it might be that the parameters for the WebRTC interface, video encoders, RTSP, or other [GStreamer](https://gstreamer.freedesktop.org) plugins are not optimized enough. If you find that it is the case, we always welcome contributions. If your changes show noticeably better results in the same conditions, please make a [Pull Request](https://github.com/selkies-project/selkies-gstreamer/pulls), or tell us about the parameters in any channel that we can reach so that we can also test.

### The HTML5 web interface loads and the signalling connection works, but the WebRTC connection fails and the remote desktop does not start.

Expand Down

0 comments on commit 07ffd56

Please sign in to comment.