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: Migrate Gitlab tests to GitHub runner #698

Merged
merged 51 commits into from
Aug 29, 2024
Merged

ci: Migrate Gitlab tests to GitHub runner #698

merged 51 commits into from
Aug 29, 2024

Conversation

ggera
Copy link
Member

@ggera ggera commented Aug 20, 2024

fixes KILTProtocol/ticket#3345

Build docker image only when tests on gh passed

Checklist:

  • I have verified that the code works
    • No panics! (checked arithmetic ops, no indexing array[3] use get(3), ...)
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)
    • Either PR or Ticket to update the Docs
    • Link the PR/Ticket here

@ggera ggera requested review from ntn-x2 and Ad96el August 20, 2024 15:35
@ggera ggera changed the title Chore: Migrate Gitlab tests to GitHub runner ci: Migrate Gitlab tests to GitHub runner Aug 20, 2024
Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

I have to say I like this structure much more. Few points:

  1. The get-head-commit can be a simple step and not a full job, as it kinda pollutes the space for the actions that are actually meaningful. And since we can't re-use it anyway, I would suggest to make it a simple step for all jobs that need it, and reference it as a step output instead.
  2. Already mentioned in a comment, but let's aim to have checks, tests and anything that does not result in a build on GH, and everything else on GL. These include Docker images, WASM blobs, and perhaps even the docs, if possible, since we can check them on GH and then deploy them from GL. If deploying the docs from GL is too complicated, I am willing to accept that we deploy them from GH, althought I wouldn't be super happy about it.
  3. Not sure we need the Dockerx stuff in GH anymore, since we can specify a container to run the action within, and environment variables as well as part of the step or job or even workflow definition.

I will take a more thorough review once these are addressed, but as I said in the beginning, this looks already much better compared to what we now have, which is already much much better than what we had last week 🔥

.gitlab-ci.yml Outdated Show resolved Hide resolved
.github/workflows/check-clippy-all-features.yml Outdated Show resolved Hide resolved
.github/workflows/check-clippy-all-features.yml Outdated Show resolved Hide resolved
restore-keys: |
$ ${{ github.job }}-${{ github.ref_name }}-clippy-all-features-

- name: Set up Docker Buildx
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this? Doesn't GH support the container instruction?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can't use the container due to resource constraints it bring yet removed this step

.gitlab-ci.yml Outdated
interruptible: true

.check_skip_rust:
build-images:
Copy link
Member

Choose a reason for hiding this comment

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

Can we move WASM building and artifacts as well to GL? SO we have all checks and tests on GH, and everything we publish we do via GL, instead of having to jump between the two.

Copy link
Member Author

Choose a reason for hiding this comment

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

done, only docs publishing will stay on gh

Copy link
Member

Choose a reason for hiding this comment

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

Rather trigger-build-images-gitlab or something to make it clear.

GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }}
run: |
curl -X POST \
Copy link
Member

Choose a reason for hiding this comment

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

Very nice!

Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

I have to say I like this structure much more. Few points:

  1. The get-head-commit can be a simple step and not a full job, as it kinda pollutes the space for the actions that are actually meaningful. And since we can't re-use it anyway, I would suggest to make it a simple step for all jobs that need it, and reference it as a step output instead.
  2. Already mentioned in a comment, but let's aim to have checks, tests and anything that does not result in a build on GH, and everything else on GL. These include Docker images, WASM blobs, and perhaps even the docs, if possible, since we can check them on GH and then deploy them from GL. If deploying the docs from GL is too complicated, I am willing to accept that we deploy them from GH, althought I wouldn't be super happy about it.
  3. Not sure we need the Dockerx stuff in GH anymore, since we can specify a container to run the action within, and environment variables as well as part of the step or job or even workflow definition.

I will take a more thorough review once these are addressed, but as I said in the beginning, this looks already much better compared to what we now have, which is already much much better than what we had last week 🔥

@ntn-x2 ntn-x2 merged commit 24d49b6 into develop Aug 29, 2024
2 checks passed
@ntn-x2 ntn-x2 deleted the github-runner branch August 29, 2024 14:31
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.

2 participants