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

Add CI with shellcheck and Linux target tests. #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Alexhuszagh
Copy link
Collaborator

This is a very basic start towards CI, but it:

  1. Adds a list of image names and maps them to their Rust target in targets.toml.
  2. Adds CI with shellcheck
  3. Adds a check if any Linux Dockerfiles have changed, and if so, runs the test suite for them.

This doesn't check if files that the Dockerfile depends on, such as scripts, are changed, but it allows us to do minimal CI without having to run tests or build images for anything that hasn't been obviously updated.

@Alexhuszagh Alexhuszagh added the meta related to the maintenance of the project label Oct 24, 2022
format: 'json'
filter: 'docker/Dockerfile.*'

- name: Validate Changed Images
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This might need a 120 minute timeout, since we use crosstool-ng images for most of these, which have quite a long build time.

git clone https://github.com/cross-rs/cross/ "${td}"
cargo build -p xtask

# copy over our project and build our docker images
Copy link
Collaborator Author

@Alexhuszagh Alexhuszagh Oct 24, 2022

Choose a reason for hiding this comment

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

I don't think it makes any sense to deploy these images, for obvious reasons, but then obviously we don't get cached builds. Not sure if there's a good solution here. Maybe we can save to local file between runs and use it to import the cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta related to the maintenance of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant