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

Chore: Centralize some Repository Config #4422

Merged
merged 8 commits into from
Nov 2, 2024

Conversation

reneme
Copy link
Collaborator

@reneme reneme commented Nov 1, 2024

This centralizes some repo-specific configuration into src/configs/repo_config.env. The settings are pulled into the CI's environment using a new GitHub action in .github/actions/read-repo-config.

The configuration in this file is relevant mostly for CI at the moment. Hence, no build scripts that are meant to be run locally are relying on those variables; perhaps except ci_build.py. In case that ever changes, the src/scripts/repo_config.py may be used to query the settings, either as a convenient CLI, or as a python module. E.g.

python3 src/scripts/repo_config.py get BORINGSSL_REPO
# prints 'randombit/boringssl

or

from repo_config import RepoConfig
cfg = RepoConfig()
print(cfg['BORINGSSL_REPO'])

This is an initial proposal. There's most likely more info that could live in such a config file. Also, I'm certainly open to criticism and improvement proposals with this. We use a similar setup in sehlen-bsi/botan-docs and that proved to be fairly useful.

Currently "Setup Build Agent" and "Read Repository Config" are deliberately split into two actions for flexibility in the setup of CI workflows. Though, at the moment they are always used together. Perhaps it makes sense to simply read the config in the setup job.

Closes #4390

@reneme reneme added the infra CI, package management, etc label Nov 1, 2024
@reneme reneme self-assigned this Nov 1, 2024
This is meant to centralize auxiliary configuration that is mostly used to
test the library in Continuous Integration. This is explicitly not meant
to influence the actual build of the released parts of the library.
@reneme reneme marked this pull request as ready for review November 1, 2024 15:05
@coveralls
Copy link

Coverage Status

coverage: 91.031% (-0.04%) from 91.072%
when pulling c660203 on Rohde-Schwarz:chore/repo_config
into bd045b1 on randombit:master.

@reneme reneme requested a review from randombit November 1, 2024 16:54
Copy link
Owner

@randombit randombit left a comment

Choose a reason for hiding this comment

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

Very nice, thanks

@reneme reneme merged commit 74d3993 into randombit:master Nov 2, 2024
38 checks passed
@reneme reneme deleted the chore/repo_config branch November 2, 2024 06:19
@randombit
Copy link
Owner

@reneme seems to be a problem with the SDE job can you take a look https://github.com/randombit/botan/actions/runs/11640528851/job/32421150718

@reneme
Copy link
Collaborator Author

reneme commented Nov 2, 2024

I accidentally removed the $PATH amendment. Therefore, the sde executable wasn't found. It didn't show up in the PR's CI because the nightly jobs didn't run. (I'm guessing because the final commit didn't change nightly.yml, c.f. #4414.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra CI, package management, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a Central Repository Config File
3 participants