Open ni4 opened 1 year ago
Who is going to add it?
@antonsviridenko Anybody interested in :) Feel free to go ahead.
I see you are more experienced in CI related things :) I can help with Gentoo-specific questions.
Btw, how git branch from the PR is passed to the runner? So the upcoming changes can be built from sources, ones that are not merged yet to the master branch?
Ah, okay then ) I am not familiar with Gentoo's package manager, so postponed this.
Branch is checked via actions/checkout@v2
, and this one most likely uses GITHUB_REF_NAME
env variable. Please see https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables for the details.
Docs say GitHub provides only Ubuntu, Windows & macos VMs. Are other OSes that we use (Centos, Fedora) self-hosted?
Gentoo does not have GitHub "runner" application in a repository, and "runner" repo does not list Gentoo in supported distros. Most likely it is possible to build & run it on Gentoo, but it will take some efforts.
- Docs say GitHub provides only Ubuntu, Windows & macos VMs. Are other OSes that we use (Centos, Fedora) self-hosted?
Ubuntu runner may use Docker image, that's how centos workflows work, see the following in .yml file:
container:
image: tgagor/centos:stream9
- Gentoo does not have GitHub "runner" application in a repository, and "runner" repo does not list Gentoo in supported distros. Most likely it is possible to build & run it on Gentoo, but it will take some efforts.
Latest Gentoo Docker images are available here: https://hub.docker.com/u/gentoo/
I've got Gentoo setup working locally via the following Dockerfile snippet:
FROM gentoo/portage:latest as portage
FROM gentoo/stage3:latest
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
RUN emerge dev-utils/cmake
RUN emerge dev-libs/json-c
#RUN emerge dev-libs/openssl
RUN emerge dev-cpp/gtest
It is better to install all dependencies in a single run of "emerge" command, it is bit slow and takes long time to calculate dependencies each time. Also app-arch/bzip2
and sys-libs/zlib
should be installed too. So it should be like
RUN emerge dev-utils/cmake dev-libs/json-c dev-cpp/gtest dev-libs/botan app-arch/bzip2 sys-libs/zlib virtual/pkgconfig dev-ruby/asciidoctor
I propose to use our RNP gentoo overlay & install emerge =app-crypt/rnp-9999
instead of building sources manually. This way ebuild scripts will be tested too.
Version 9999
in Gentoo means "live ebuild", i.e. package built from the latest development version, last commit from the repo.
https://github.com/rnpgp/gentoo-rnp/blob/master/app-crypt/rnp/rnp-9999.ebuild#L11
Remaining issue is to tell package manager which git branch to pull instead of default one.
Branch is checked via actions/checkout@v2, and this one most likely uses GITHUB_REF_NAME env variable.
https://devmanual.gentoo.org/eclass-reference/git-r3.eclass/index.html
git branch can be specified by setting ebuild variable EGIT_BRANCH
, but these variables are not supposed to be set on the command line or through environment variables. That means we need to overwrite rnp-9999.ebuild
file each time and put new value for EGIT_BRANCH
inside.
@antonsviridenko This approach could bring more complications, as CI should also work with forks, and so on. Also from the architectural point of view Gentoo stuff is something which of higher layer then RNP library, so we should not call it from lower layer. I'd suggest to separate this in two solutions:
rnp-0.16.2.ebuild
to that repository.Does this sound good, or do I miss something?
ok, sounds reasonable
Description
...checking both Botan and OpenSSL backends.