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: ci: create gh workflow that runs go checks #11761

Merged
merged 5 commits into from
Mar 22, 2024
Merged

ci: ci: create gh workflow that runs go checks #11761

merged 5 commits into from
Mar 22, 2024

Conversation

galargh
Copy link
Contributor

@galargh galargh commented Mar 20, 2024

Related Issues

#11734

Proposed Changes

This PR creates a new GitHub Actions workflow (check.yml) that performs the following jobs previously handled exclusively by CircleCI:

  • docs-check
  • gen-check
  • gofmt
  • lint-all
  • mod-tidy-check

Additional Info

You can find an example run of the workflow at: https://github.com/filecoin-project/lotus/actions/runs/8362592926

Unlike the CircleCI check jobs, the ones from the newly added workflow do not have to wait for the build (make lotus deps) to finish. Instead, the check jobs call make lotus and make deps as needed. This results in some work duplication but reduces the overall workflow runtime by ~3 minutes.

We did not use a configuration matrix in the newly added workflow because, in our opinion, separate jobs provide better clarity here. It wouldn't be a mistake to opt in for the matrix approach, though.

The newly added makes use of 2 helper actions:

  • install-ubuntu-deps: which installs ocl-icd-opencl-dev libhwloc-dev pkg-config on the runner
  • install-go: which installs go on the runner (it uses the version it finds in the go.mod file)

The newly added workflow is intended to run alongside its' CircleCI counterpart for 1-2 weeks. After that period, we want to evaluate its' success rate and execution time. Based on this information, we'll either remove the applicable CircleCI jobs or apply necessary fixes to the new workflow and repeat the evaluation.

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@galargh galargh requested a review from laurentsenta March 20, 2024 18:40
@galargh galargh marked this pull request as ready for review March 21, 2024 17:19
@galargh galargh requested review from masih and Stebalien March 21, 2024 17:19
@galargh galargh merged commit ed98bf9 into master Mar 22, 2024
97 checks passed
@galargh galargh deleted the ipdx-gha-check branch March 22, 2024 12:57
LexLuthr pushed a commit that referenced this pull request Mar 26, 2024
* ci: create gh action that installs go from go.mod

* ci: create gh action that installs ubuntu dependencies

* ci: create gh workflow that runs go checks

* ci: test the check workflow

* Revert "ci: test the check workflow"

This reverts commit 1d0759d.
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