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

add nix to ci #201

Open
quinn-dougherty opened this issue Nov 3, 2021 · 2 comments
Open

add nix to ci #201

quinn-dougherty opened this issue Nov 3, 2021 · 2 comments

Comments

@quinn-dougherty
Copy link
Contributor

i'm starting a branch on my fork for this.

one solution

cp hs-to-coq.yml hs-to-coq-nix.yml and replace stack-built executable with nix-built executable in hs-to-coq-nix.yml when it tests that examples work as expected, duplicating code (not ideal).

Another solution

breaking out into precheck.yml and calling that job from both hs-to-coq-stack.yml and hs-to-coq-nix.yml, to replicate the basic conditional logic about not running jobs if relevant files weren't edited. In general, it's possible that a .yml file well under 430 lines would be easier to reason about.

galaxybrained best solution?

a stack process and a nix process each build an executable, and those two executables are input to one job sequence, which runs once for the stack-built executable and once for the nix-built executable. I don't know how to do this, off the top of my head.

passing in a ghcVersion argument to .nix should be a pretty easy way for the nix side of ci to improve upon the #200 situation.

@lastland
Copy link
Collaborator

lastland commented Nov 4, 2021

I am not familiar with the nix workflow so I can't comment which one works best, but it does seem helpful to split the current CI script into some reusable modules.

@quinn-dougherty
Copy link
Contributor Author

I thought of that. I can piggyback splitting up the main ci file into multiple files (but retain identical functionality) into a PR that has nix ci. However, the pipeline view (attached) is based on files, so there are advantages to having one 400 line ci file.
Screenshot from 2021-11-04 09-12-39
But I would hope there's some way to retain the view you want even if there are multiple files. For example, if there's hs-to-coq-stack.yml and hs-to-coq-nix.yml they should each import precheck.yml instead of each of them starting with duplicated precheck jobs. It's probably desirable for nix and stack ci to be on different pipeline views.

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

No branches or pull requests

2 participants