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

CI: Add Docker-based compatibility tests #563

Closed
wants to merge 8 commits into from

Conversation

mkannwischer
Copy link
Contributor

This PR adds Docker-based compatibility tests for various Ubuntu-20 and Ubuntu-22 docker images; so far, AArch64 only.

A number of changes had to be made, esp. to the test scripts; see commits.

Fix #560

(Hoisted out from #562)

This commit makes the test scripts compatible with Python 3.8.

- It removes all typing annotations, adding some additional
  commentary instead.
- It removes the | operator for dictionaries
- It removes `match` on enums
- It removes `removeprefix()`

It also notes and fixes some problematic uses of objects
(specifically `{}` and `[]`) being used for default-values;
`None` is used instead and the intended default values installed
at the beginning of the function.

Signed-off-by: Hanno Becker <[email protected]>
This enables the use of the `functest` action outside of the
nix shell, where `./scripts` and `./scripts/ci` may not be
in the PATH.

Signed-off-by: Hanno Becker <[email protected]>
This commit makes the use of `sudo` optional in the `setup-ubuntu`
action. This is to make it suitable for running on Ubuntu Docker
images, which do not come with `sudo` by default.

Signed-off-by: Hanno Becker <[email protected]>
Some compilers don't seem to like it.

Signed-off-by: Hanno Becker <[email protected]>
This commit extends the CI to run compatibility tests for Docker images

- ubuntu-22.04:gcc-12x
- ubuntu-22.04:gcc-11x
- ubuntu-20.04:gcc-8x
- ubuntu-20.04:gcc-7x
- ubuntu-20.04:clang-9x
- ubuntu-20.04:clang-8x
- ubuntu-20.04:clang-7x-bm-framework
- ubuntu-20.04:clang-7x
- ubuntu-20.04:clang-10x
- ubuntu-22.04:base

Those images are pre-built on a custom EC2 AMI, and match the images
used in the AWS-LC CI.

Signed-off-by: Hanno Becker <[email protected]>
@mkannwischer mkannwischer requested a review from a team as a code owner December 21, 2024 15:11
scripts/lib/mlkem_test.py Show resolved Hide resolved
# such as lto. Using gcc-ar is preferred when creating or linking static libraries
# if the binary is compiled with -flto. However, it is not universally present, so
# only use it if available.
CC_AR ?= $(if $(shell which gcc-ar),gcc-ar,ar)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't this break if you are using Darwin with gcc-ar installed, but you compile with clang?
I'm not very sure about this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I tried to fix this by looking at cc --version to see if it's clang or not, and if it's gcc, check for gcc-ar.

@mkannwischer mkannwischer mentioned this pull request Dec 21, 2024
@mkannwischer
Copy link
Contributor Author

Included in #562

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.

Make test scripts usable in older versions of Python
2 participants