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

cd: publish rpm/deb packages on tag push #164

Merged
merged 5 commits into from
Jul 26, 2022
Merged

cd: publish rpm/deb packages on tag push #164

merged 5 commits into from
Jul 26, 2022

Conversation

artembo
Copy link
Contributor

@artembo artembo commented Jul 6, 2022

Implement GitHub Actions job which will publish rpm and deb packages for maintained operation systems.

The new workflow (packaging.yml) is intended to run on a tag push
for creating and deploying module packages to S3 based repositories.

Unfortunately, Packpack couldn't start without modification the http
repo.

Packpack performs building rpm packages in a clean docker container.
The container must contain luatest to perform testing during the
build as it was set by -DEB_MAKE_CHECK_TARGET := luatest variable.

It's quite challenging to set up luacheck while the package is
building and a bit useless because the module is tested in another job.

Added prebuild.sh script for both rpm and debian with
installation of Tarantool repo.

Another issue is "out-of-source build" failure.
Starting with fedora 33, the cmake build strategy has been changed
to "out-of-source builds" by default (see [1]). Let's add support
for the new behaviour.

[1] https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

/build folder will contain tmp files to build rpm/deb packages
/packpack is a tool for building packages
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 7f8ea3b to 2676e6a Compare July 6, 2022 08:37
rpm/prebuild.sh Outdated Show resolved Hide resolved
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 63ec5a2 to 1ade115 Compare July 11, 2022 18:40
@artembo artembo changed the title Artembo/packaging cd: publish rpm/deb packages on tag push Jul 12, 2022
@artembo
Copy link
Contributor Author

artembo commented Jul 12, 2022

@Totktonada many thanks for the help with rpm, building packages with your suggestion works flawlessly.

Another issue is in deb package. There's an error during the build because of the absent luatest. If I disable testing in debian/rules, the build finishes successfully.

--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,6 @@
 
 DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
                        -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DEB_MAKE_CHECK_TARGET := luatest
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/cmake.mk

Following the approach for rpm .spec, can I get rid of luatest testing during the build?

@Totktonada
Copy link
Member

Following the approach for rpm .spec, can I get rid of luatest testing during the build?

At least until we'll package luatest, it is okay.

@artembo
Copy link
Contributor Author

artembo commented Jul 12, 2022

See dry run of building packages by introduced workflow here

@artembo artembo marked this pull request as ready for review July 12, 2022 14:20
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 83ab5dc to 32c5c2d Compare July 12, 2022 14:39
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from b10ae75 to 9f8f30a Compare July 19, 2022 09:19
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 3fd6017 to 37341c1 Compare July 19, 2022 10:30
Starting with fedora 33, the cmake build strategy has been changed
to "out-of-source builds" by default (see [1]). Let's add support
for the new behavior.

Added `prebuild.sh` script with installation of Tarantool repo.

`Packpack` performs building rpm packages in a clean docker container.
The container must contain `luatest` to perform testing during the
build as it was set by `-DCMAKE_BUILD_TYPE=RelWithDebInfo` cmake var.
This cmake var was removed in this commit as well as `%check` phase.

It's quite challenging to set up `luacheck` while the package is
building and a bit useless because the module is tested in another job.

[1] https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

Closes #165
`Packpack` installs dependencies using default apt repo. To provide
the latest version of Tarantool 1.10 (the latest of the lower supported
version), `prebuild.sh` script wich installs Tarantool repo was added
to debian spec folder.
`Packpack` performs building rpm packages in a clean docker container.
The container must contain `luatest` to perform testing during the
build as it was set by `-DEB_MAKE_CHECK_TARGET := luatest` variable.

It's quite challenging to set up `luacheck` while the package is
building and a bit useless because the module is tested in another job.

This commit removes testing http module during the build by `packpack`.
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 602c34d to 6291dad Compare July 19, 2022 11:28
@artembo artembo requested a review from Totktonada July 19, 2022 11:28
@artembo
Copy link
Contributor Author

artembo commented Jul 19, 2022

@Totktonada please review updated PR with resolving conversations if you are satisfied by the changes or answers.

@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 4da3152 to 19a28bf Compare July 20, 2022 16:53
@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from 08097f6 to b66289b Compare July 24, 2022 18:41
- { os: 'ubuntu', dist: 'bionic' }
- { os: 'ubuntu', dist: 'focal' }
- { os: 'ubuntu', dist: 'groovy' }
- { os: 'ubuntu', dist: 'hirsute' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is red here.

Copy link

@LeonidVas LeonidVas Jul 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fails caused by disabling Ubuntu repositories of EOL hisrute and impish. @0x501D, can I remove these OS versions from the workflow?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I see no reason to run CI on EOL distributions

Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with current state of the PR aside of two remaining comments. Let's fix them and take my approve.

Please, proceed with Leonid for further steps.

@artembo artembo force-pushed the artembo/packaging branch 2 times, most recently from b66289b to e440fa5 Compare July 26, 2022 09:27
This workflow is intended to run on a tag push for creating and
deploying module packages to S3 based repositories.

Closes #163
Copy link

@LeonidVas LeonidVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@0x501D 0x501D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0x501D 0x501D merged commit 89f6edc into master Jul 26, 2022
@0x501D 0x501D deleted the artembo/packaging branch July 26, 2022 15:17
- { os: 'ubuntu', dist: 'xenial' }
- { os: 'ubuntu', dist: 'bionic' }
- { os: 'ubuntu', dist: 'focal' }
- { os: 'ubuntu', dist: 'groovy' }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu Groovy 20.10 is EOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup building and publishing of rpm and deb packages, release http 1.2.0 for Centos 7
5 participants