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 from Travis and AppVeyor to GitHub Actions #536

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

eine
Copy link
Collaborator

@eine eine commented Sep 9, 2019

Example run: https://github.com/1138-4EB/vunit/runs/258363743

Now that GitHub Actions (GHA) are enabled for the VUnit organization, this is work-in-progress to migrate from Travis and AppVeyor. ToDo:


Currently, these are the test matrices:

linux: [
          37-fmt,
          37-lint,
          27-unit,
          35-unit,
          37-unit,
          27-docs,
          37-docs,
],
docker (linux): [
  {do: acceptance,  ver: 27, img: mcode-2},
  {do: acceptance,  ver: 37, img: llvm},
  {do: vcomponents, ver: 37, img: mcode},
],
windows: [
          27-acceptance-ghdl,
          37-acceptance-ghdl,
          37-vcomponents-ghdl,
          37-lint,
          27-unit,
          35-unit,
          37-unit,
          27-docs,
          37-docs,
]

I wonder if we should add these jobs:

  • GNU/Linux:
    • vcomponents with LLVM backend.
    • acceptance with mcode backend.
  • Windows:
    • acceptance and vcomponents with LLVM backend.

There are 19 jobs already, and adding these would sum up to 23. When Python 2 is deprecated (scheduled for January 1, 2020), the number of jobs will be reduced to 13 (17).

@eine eine force-pushed the migrate-to-gha branch 2 times, most recently from 718da5e to 35217fd Compare September 10, 2019 12:49
@eine
Copy link
Collaborator Author

eine commented Sep 10, 2019

Regarding coloured logs, on the current master branch:

This PR: https://github.com/1138-4EB/vunit/commit/8f3483046913065d219007a46678198a5ec0fd9b/checks

  • Jobs executed on the host VM with pytest (i.e. *-lint, *-unit, -Windows only- *acceptance*) require --color=yes to be added to tox.ini.
  • Jobs executed in docker GNU/Linux containers (with pytest -*acceptance*-, or without it -*vcomponents*-), have coloured logs without further modifications.
  • For jobs executed without pytest ( *vcomponents* on Windows) see Improve IS_WINDOWS_SYSTEM check #539.

Nonetheless, I am not happy with adding --color=yes to the tox.ini file. Colour support is automatically enabled on docker containers. Ideally, we should be able to start shells in GHA with the appropriate environment. It would allow us not to 'force' colours in each tool explicitly. See actions/starter-workflows#114 and tartley/colorama#214.

@eine eine force-pushed the migrate-to-gha branch 2 times, most recently from 8f34830 to 34db411 Compare September 14, 2019 09:46
@eine eine added the CI label Sep 18, 2019
@eine eine force-pushed the migrate-to-gha branch 4 times, most recently from 9b4ce89 to 083ff20 Compare October 13, 2019 17:42
@eine eine force-pushed the migrate-to-gha branch 6 times, most recently from 4febec9 to e64d482 Compare October 20, 2019 17:28
@eine eine mentioned this pull request Oct 20, 2019
2 tasks
@eine eine force-pushed the migrate-to-gha branch 11 times, most recently from 53afd04 to 5e4412f Compare October 24, 2019 18:20
@eine eine force-pushed the migrate-to-gha branch 2 times, most recently from 0e3ab3b to 5b7db34 Compare November 20, 2019 00:45
@eine eine force-pushed the migrate-to-gha branch 6 times, most recently from 5b24d8d to 15e5034 Compare November 30, 2019 09:16
@eine
Copy link
Collaborator Author

eine commented Dec 1, 2019

Updates:

  • This PR is now based on Remove Python 2.7 support #596; hence, we won't merge this until Python 2 is removed from master.
  • Assuming that the next step will be to deprecate/remove Python 3.5 in order to support mypy, a commit in this PR changes it: 74ae885 Nevertheless, this commit can be split to a separate PR.
  • The relevant content, where workflow 'push' is added, is contained in a single script: 40c1a48 Compared to the comments above, the proposal is not to replace Travis and AppVeyor, but to use the three services:
    • Travis for Python3.8 tests on GNU/Linux only, and for releasing/publishing to PyPI.
    • Appveyor for Python 3.8 tests on windows only.
    • GHA for all other GNU/Linux and Windows tests (3.5/3.6, 3.7, fmt, docs, etc), and for publishing the docs to vunit.github.io.

This approach is expected to be less disruptive than doing the replacement at once.

  • The last commit is where .travis.yml and .appveyor are removed, and releasing is managed through twine in GHA: 15e5034 We can delay this until we finish deprecating and reorganizing the codebase.

Regarding colouring (#536 (comment)), the current solution is acceptable, since modifications to tox.ini are quite clean: https://github.com/VUnit/vunit/pull/536/files#diff-b91f3d5bd63fcd17221b267e851608e8

Note that the intermediate commit, where the three services are used, fixes colouring (tox and pytest) on Travis CI too.

@eine eine merged commit fb6e7ab into VUnit:master Jan 24, 2020
@eine eine deleted the migrate-to-gha branch January 24, 2020 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant