Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[META] Use automated testing / Add .deb/.rpm/pacman packages #58

Open
ehfd opened this issue Sep 28, 2022 · 20 comments
Open

[META] Use automated testing / Add .deb/.rpm/pacman packages #58

ehfd opened this issue Sep 28, 2022 · 20 comments
Assignees
Labels
CI/CD CI/CD procedures or container usage documentation Documentation improvements or additions good first issue Good for newcomers help wanted External contribution is required

Comments

@ehfd
Copy link
Member

ehfd commented Sep 28, 2022

  • Build and add .deb and .rpm packages (help for Arch or Alpine distros also welcome)

We should definitely do this, but we need help. This requires build procedures for every relevant distro.

  • Testing workflows

In every PR, we should test using Selenium and Firefox an end-to-end procedure, starting from container builds to testing that GStreamer starts, and we see that the Start button of the web interface is visible.

  • Formatting, automatic code assessment tools, and a single syntax for code documentation

We should incorporate format checking such as pylint or yapf and code testing. Similarly for JavaScript. Code checking and assessments should automatically be done when a Pull Request starts.
People with relevant experience are welcome to reach out.

Code documentation should also be added to the code itself. There are well-documented locations and those that aren't really so.

These should be done before the codebase becomes substantially larger than now.

@ehfd ehfd changed the title Formatting, automatic code assessment tools, and syntax for code documentation Formatting, automatic code assessment tools, and a single syntax for code documentation Sep 28, 2022
@ehfd ehfd changed the title Formatting, automatic code assessment tools, and a single syntax for code documentation Add .deb and .rpm packages to the repository and use automated format checking Oct 5, 2022
@ehfd ehfd changed the title Add .deb and .rpm packages to the repository and use automated format checking Use automated testing and add .deb and .rpm packages to the repository Oct 8, 2022
@ehfd ehfd added enhancement New feature or request help wanted External contribution is required good first issue Good for newcomers documentation Documentation improvements or additions CI/CD CI/CD procedures or container usage and removed enhancement New feature or request labels Oct 12, 2022
@ehfd ehfd changed the title Use automated testing and add .deb and .rpm packages to the repository Use automated testing and add .deb and .rpm packages Oct 13, 2022
@ehfd
Copy link
Member Author

ehfd commented Nov 9, 2022

https://github.com/pacstall/pacstall
I also stumbled upon this; an AUR for Ubuntu?

@ehfd
Copy link
Member Author

ehfd commented Nov 28, 2022

@danisla
The following are outdated actions which require major updates to the pipeline:
tj-actions/changed-files@v1.1.2 (newest version does not work just by changing the tag)
actions/create-release@v1 (archived and deprecated)
actions/upload-release-asset@v1 (archived and deprecated)

@ehfd ehfd changed the title Use automated testing and add .deb and .rpm packages Use automated testing and add .deb/.rpm/pacman packages Jan 18, 2023
@ehfd
Copy link
Member Author

ehfd commented Sep 4, 2023

@danisla The Actions pipeline is buggy. The release for GStreamer is always botched for some reason when Build & publish all images is not run before Publish release, and the actions are outdated.

Ref: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

@ehfd ehfd changed the title Use automated testing and add .deb/.rpm/pacman packages Revamp GitHub Actions pipeline / Use automated testing and add .deb/.rpm/pacman packages Sep 4, 2023
@ehfd ehfd changed the title Revamp GitHub Actions pipeline / Use automated testing and add .deb/.rpm/pacman packages Revamp GitHub Actions pipeline / Use automated testing / Add .deb/.rpm/pacman packages Sep 4, 2023
@ehfd
Copy link
Member Author

ehfd commented Sep 5, 2023

@danisla It seems that the release pipeline is broken. GStreamer is not delivered correctly especially in Ubuntu 20.04 and apparently breaks something with the caching mechanism.

For now, upload releases manually.

@danisla
Copy link
Member

danisla commented Sep 5, 2023

@danisla It seems that the release pipeline is broken. GStreamer is not delivered correctly especially in Ubuntu 20.04 and apparently breaks something with the caching mechanism.

For now, upload releases manually.

The pipeline fixes should be a separate bug, adding .deb packages is a new feature.

@ehfd ehfd changed the title Revamp GitHub Actions pipeline / Use automated testing / Add .deb/.rpm/pacman packages Use automated testing / Add .deb/.rpm/pacman packages Sep 5, 2023
@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

@danisla I won't open a new issue because I feel the CI is nearly fixed, but is it intended that gst-py-examples containers are not built in "Build & publish changed images"?

@danisla
Copy link
Member

danisla commented Sep 6, 2023

I was attempting to only build the gst-py-examples if any of the matrix tasks changed, but it's not obvious that this is possible ATM.
This commit should always build the example images: 587ec41

@danisla
Copy link
Member

danisla commented Sep 6, 2023

@ehfd for new releases, the process has changed slightly. The pipeline no longer creates the GH release.

  1. manually create the Github Release and Tag.
  2. Generate the release notes with the github button.
  3. The pipeline will trigger once the release is published and will upload the assets to the release.

@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

Default branch was changed to main to comply with GitHub guidances. If you have a local clone, please use:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

@ehfd for new releases, the process has changed slightly. The pipeline no longer creates the GH release.

  1. manually create the Github Release and Tag.
  2. Generate the release notes with the github button.
  3. The pipeline will trigger once the release is published and will upload the assets to the release.

I have complied to this process. Best way is to set the new release as a pre-release until the assets are uploaded then change to latest.

@danisla
Copy link
Member

danisla commented Sep 6, 2023

Default branch was changed to main to comply with GitHub guidances. If you have a local clone, please use:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Are you going to update all the things that depend on master?

@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

Default branch was changed to main to comply with GitHub guidances. If you have a local clone, please use:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Are you going to update all the things that depend on master?

I am doing it.

@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

I am doing it.

Done.

I am freezing both the desktop containers and Selkies-GStreamer after v1.4.3 and withdrawing for a few months, unless immediate issues arise.

Please ask me before a release, as it can affect the desktop containers.

@danisla
Copy link
Member

danisla commented Sep 6, 2023

Not sure if I’m ok freezing all Selkies gstreamer releases for a few months. Can you lock the desktop containers to Selkies-gstreamer v1.4.3? Having them roll with latest doesn’t seem like good CI practice anyway.

@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

Not sure if I’m ok freezing all Selkies gstreamer releases for a few months. Can you lock the desktop containers to Selkies-gstreamer v1.4.3? Having them roll with latest doesn’t seem like good CI practice anyway.

If so, you can make a release, no problem.
But I still do want to roll with latest.
I'll manually trigger a rebuild when I can check things. That way the container images will be alive even after releases introduce incompatibilities.

@ehfd
Copy link
Member Author

ehfd commented Sep 6, 2023

Unless something is very out of the ordinary, the container desktops will be kept as-is for at least a few months (only Selkies-GStreamer dependencies will be updated as there are new releases).
I have exhausted and fixed every reason the container might break.

@danisla You are free to make releases, just contact and tell me when you have changed the GStreamer Dockerfile (or its runtime dependencies in Dockerfile.example). Anything otherwise will not interfere with the containers.

@ehfd
Copy link
Member Author

ehfd commented Sep 29, 2023

@danisla
It seems a good idea to:

  1. Create a merged .deb package which includes the Python, GStreamer, Web, and the Interposer.
  2. Ship a .tgz archive of the interposer .so file, because one of the advantages of using Selkies is not having to install as root.
  3. How would it be possible to create a completely portable version of all the components?

@ehfd ehfd changed the title Use automated testing / Add .deb/.rpm/pacman packages [META] Use automated testing / Add .deb/.rpm/pacman packages Oct 12, 2023
@ehfd
Copy link
Member Author

ehfd commented Oct 19, 2023

@danisla build_changed_images is broken, looks like it's incomplete.

# Note: When modifying this job, copy modifications to all other workflows' image jobs.
changed_example_images:
needs: changed_component_images
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: gst-py-example
version_suffix: -ubuntu20.04
push_image: "false"
build_args: PACKAGE_VERSION=0.0.0.dev0;UBUNTU_RELEASE=20.04;GSTREAMER_BASE_IMAGE_RELEASE=pr${{ matrix.version_suffix }};PY_BUILD_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/py-build:pr${{ matrix.version_suffix }};WEB_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/gst-web:pr${{ matrix.version_suffix }};JS_BASE_IMAGE_RELEASE=pr${{ matrix.version_suffix }};JS_BASE_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/js-interposer
dockerfile: Dockerfile.example
source_directory: .
source_files_for_diff: |
addons/**
src/**
Dockerfile
Dockerfile.example
pyproject.toml
setup.cfg
.github/workflows/build_and_publish_changed_images.yaml
- name: gst-py-example
version_suffix: -ubuntu22.04
push_image: "false"
build_args: PACKAGE_VERSION=0.0.0.dev0;UBUNTU_RELEASE=22.04;GSTREAMER_BASE_IMAGE_RELEASE=pr${{ matrix.version_suffix }};PY_BUILD_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/py-build:pr${{ matrix.version_suffix }};WEB_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/gst-web:pr${{ matrix.version_suffix }};JS_BASE_IMAGE_RELEASE=pr${{ matrix.version_suffix }};JS_BASE_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/js-interposer
dockerfile: Dockerfile.example
source_directory: .
source_files_for_diff: |
addons/**
src/**
Dockerfile
Dockerfile.example
pyproject.toml
setup.cfg
.github/workflows/build_and_publish_changed_images.yaml

@ehfd
Copy link
Member Author

ehfd commented Apr 22, 2024

Remaining tasks:
Build and add .deb and .rpm packages (help for Arch or Alpine distros also welcome): This is still preferred despite considering Conda and AppImages.
Formatting, automatic code assessment tools, and a single syntax for code documentation: Consider SonarCube as a potential possibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD CI/CD procedures or container usage documentation Documentation improvements or additions good first issue Good for newcomers help wanted External contribution is required
Projects
None yet
Development

No branches or pull requests

2 participants