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

Implement GitHub Actions for lint and buildAndTest #49

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

GleasonK
Copy link
Member

@GleasonK GleasonK commented Aug 26, 2022

Initial implementation of GitHub Actions CI. This changelist implements two actions:

Build & Test:

  • Check out the llvm revision specified in llvm_version.txt
  • Build LLVM with ccache enabled (first time cost ~1.5hr, following runs ~10-15min)
  • Build StableHLO with ccache
  • Run ninja check-stablehlo
  • Fails if any build or test failures.

Lint:

  • Run git-clang-format on the files being submitted.
  • Fails if any files' formatting are updated.

Examples of what the CI page will look like can be seen at: https://github.com/GleasonK/stablehlo/actions

Future work:

  • We can consider running buildAndTest on other platforms in the future, github offers macos/mac-arm.
  • The lint action worked in the limited testing that I ran on it, but could use a bit more testing. I think that the production repo will be a good way to test if everything is in order.
  • Consider any other tests/linting we want to run. If we add python bindings, there is some python formatting and linting that can be added later.

Closes #12

build_tools/github_actions/ci_build_llvm.sh Outdated Show resolved Hide resolved
.github/workflows/lint.yml Show resolved Hide resolved
.github/actions/setup-build/action.yml Outdated Show resolved Hide resolved
.github/actions/setup-build/action.yml Outdated Show resolved Hide resolved
.github/actions/setup-build/action.yml Outdated Show resolved Hide resolved
.github/workflows/buildAndTest.yml Outdated Show resolved Hide resolved
.github/workflows/buildAndTest.yml Outdated Show resolved Hide resolved
build_tools/github_actions/ci_build_llvm.sh Outdated Show resolved Hide resolved
build_tools/github_actions/ci_build_llvm.sh Outdated Show resolved Hide resolved
@GleasonK
Copy link
Member Author

GleasonK commented Aug 30, 2022

Addressed feedback. Actions job with the new changes is running on https://github.com/GleasonK/stablehlo/actions. Let's wait for that before any accept/merge is made.

Edit: Tests all passed in gleasonk/stablehlo actions.

build_tools/github_actions/ci_build_llvm.sh Outdated Show resolved Hide resolved
.github/workflows/buildAndTest.yml Outdated Show resolved Hide resolved
.github/workflows/buildAndTest.yml Outdated Show resolved Hide resolved
@GleasonK
Copy link
Member Author

GleasonK commented Sep 1, 2022

Rebased on main.

Should be good for final review / merge. Please wait for the actions job on my forked repo to complete successfully before merge, the lint action already passed:
https://github.com/GleasonK/stablehlo/actions/runs/2972714760

@GleasonK
Copy link
Member Author

GleasonK commented Sep 1, 2022

Edit: GH Actions job passed. Only took 4m 53s with caching, not bad.

Copy link
Contributor

@burmako burmako left a comment

Choose a reason for hiding this comment

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

Please also update the PR description to reword "We can consider only running buildAndTest on linux in the future, mac is a bit of a redundancy, but will help us distinguish a real failure from a build configuration issue in GH Actions".

.github/actions/setup-build/action.yml Outdated Show resolved Hide resolved
@GleasonK GleasonK merged commit 7248c1b into openxla:main Sep 1, 2022
@GleasonK GleasonK deleted the actions branch September 1, 2022 15:35
@burmako burmako mentioned this pull request Sep 6, 2022
@burmako burmako added Build and removed Process labels Sep 15, 2022
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.

Set up continuous integration
2 participants