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 build coverage for examples #1655

Merged
merged 18 commits into from
Mar 8, 2023
Merged

ci: add build coverage for examples #1655

merged 18 commits into from
Mar 8, 2023

Conversation

jmayclin
Copy link
Contributor

@jmayclin jmayclin commented Mar 4, 2023

  • update ci workflow to automatically run on all examples
  • add fmt and lint steps for examples
  • fix fmt, lint, and build errors for examples

Resolved issues:

resolves #1639

Description of changes:

Update the current example job in the ci workflow to dynamically update itself. The env step outputs a list of all of the examples, and then we run the example ci job on each one of those.

This PR also adds a formatting and linting step that run on the example repos.

The created several lint errors that this PR also addresses.

This PR also removes the version specification of the s2n-rustls crate. Since it is specified by path we would otherwise have a broken example everytime we do a version bump.

This also updates the ci.yml file to use the preferred output setting methodology: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

We'll want to follow-up with the other workflow files, but I was running into weird build failures with the qns docker container, so focusing on one issue at a time.

Call-outs:

I'm not disabling the -A clippy::derive_partial_eq_without_eq lint because there aren't any API stability concerns about examples.

Testing:

The examples workflow should pass.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jmayclin added 5 commits March 4, 2023 00:32
This commit adds a CI workflow to fmt, lint, and build all of the
examples. We just default to the latest stable toolchain. We use a
single job instead of multiple jobs because sharing matrices across
actions is very ugly.
Also switch to using a stable toolchain.
The folder names of the examples were updated earlier, but I forgot to
change the matrix names as well.
we actually already have a ci script that runs for examples. We should
add linting and formating to it, since I already changed some of those
things because I had it running locally.
When updating our actions I noticed that the set-output command is being
deprecated, and apparently has some unfortunate security implications.

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
jmayclin added 11 commits March 6, 2023 20:06
The output seems to be working, so this should be fine
otherwise github fails to parse it.
The docker image is now failing to build, and I suspect that it is due
to some of my tag finagling. Add more logging to see if I can find the
differences between the logged outputs.
I am needlessly complicating my life. I'll follow this PR up with the
set-output changes. For now, just add formatting and linting to the
examples.
I forgot to actually type "clippy" because I just copied the arguments
from the earlier action.
I don't know whether the toolchain action works with multiple
toolchains, but we're about to findout.
the toolchain documentation said that it should be installed by default,
but their examples show it being explicitly installed, so try explicitly
installing it.
Since tha path is specified for this examples, it should be consumed
transitively. Manually specifying the version will cause build failures
after a version bump.
@jmayclin jmayclin enabled auto-merge (squash) March 7, 2023 02:23
@jmayclin jmayclin requested a review from camshaft March 7, 2023 02:26
Copy link
Contributor

@camshaft camshaft left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

.github/workflows/ci.yml Outdated Show resolved Hide resolved
examples/rustls-mtls/Cargo.toml Outdated Show resolved Hide resolved
@jmayclin jmayclin merged commit 25c29e7 into aws:main Mar 8, 2023
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.

Dependencies version of examples needs to update
2 participants