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

chore(ci): New layout of the CI #473

Merged
merged 21 commits into from
Feb 15, 2021
Merged

chore(ci): New layout of the CI #473

merged 21 commits into from
Feb 15, 2021

Conversation

owulveryck
Copy link
Member

@owulveryck owulveryck commented Feb 11, 2021

This is a complete rewrite of the CI factory.

Workflows

There are now three workflows corresponding to the different OS of the runners:

  • Build and Tests on Linux/amd64
  • Build and Tests on MacOS/amd64
  • Build and Tests on Self-Hosted (arm)

Jobs

Each workflow is composed of two jobs:

  • stable-go
  • previous-go

Both jobs are identical besides the go version they are executing. The reason to avoid the matrix strategy is that GitHub appends the matrix tags to each of the running jobs. As a consequence, changing the version of Go implies modifying the protection policy of the project.

Caching

Each job is trying to use the cache mechanism to lower the time passed in the CI.

Steps

The jobs are:

  • Building the code for the current platform
  • cross-compiling the code for any other platform
  • Launching some tests with the race condition

A matrix strategy is only present to tests the build tags (as it was before). A special tag "none" is present. If tag is none, the -tag is omitted.

README

With this build process, I think it is safe to use the badge of the Linux runner on the README. It performs all the tests on Linux and validates that the code is compilable on all the platforms.

TODO

Once this PR is validated, the protection of the master branch needs to be tweaked to request the validation of:

  • Build and Tests on Linux/amd64 / Build and test on latest stable Go release (none)
  • Build and Tests on Linux/amd64 / Build and test on latest stable Go release (avx) if mandatory
  • Build and Tests on Linux/amd64 / Build and test on latest stable Go release (see) if mandatory
  • ...:

Maintenance

When a new Go version is dropped, there is a need to modify the three workflows

Optimization

The code is heavily repeated (DRY they said). If this system is ok for us, it could be good to write a small tool (based on templates), to automate all the stuff when a new Go version is dropped.

@owulveryck owulveryck force-pushed the ci-cleaning branch 2 times, most recently from ef008c7 to 6af7bd6 Compare February 12, 2021 15:31
@owulveryck owulveryck force-pushed the ci-cleaning branch 3 times, most recently from f4b38b1 to ef6e7d6 Compare February 12, 2021 16:01
@owulveryck owulveryck force-pushed the ci-cleaning branch 3 times, most recently from 5854ecb to a38e74a Compare February 12, 2021 16:21
@owulveryck owulveryck changed the title chore(wip): trying to refactor the actions chore(ci): New layout of the CI Feb 12, 2021
@owulveryck owulveryck marked this pull request as ready for review February 12, 2021 19:24
@owulveryck
Copy link
Member Author

I forgot to add the coverage in the CI.
I will do that soon

@codecov-io
Copy link

codecov-io commented Feb 14, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@c8283ea). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #473   +/-   ##
=========================================
  Coverage          ?   55.41%           
=========================================
  Files             ?       71           
  Lines             ?    11597           
  Branches          ?        0           
=========================================
  Hits              ?     6426           
  Misses            ?     4324           
  Partials          ?      847           
Flag Coverage Δ
unittests 55.41% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8283ea...bc42e0c. Read the comment docs.

@owulveryck
Copy link
Member Author

Good to merge if the review is ok.

.github/workflows/coverage.yml Outdated Show resolved Hide resolved
.github/workflows/job-template.go Show resolved Hide resolved
@chewxy
Copy link
Member

chewxy commented Feb 15, 2021

let's make AVX and SSE2 mandatory

@owulveryck
Copy link
Member Author

Can I merge? (and take care of the settings of the project to make things mandatory)

@owulveryck owulveryck merged commit b0a36ed into master Feb 15, 2021
@owulveryck owulveryck deleted the ci-cleaning branch February 15, 2021 08:05
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.

4 participants