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): ci refactor - Part 1 - Generate ci yaml by js #17335

Merged
merged 5 commits into from
Jan 11, 2023

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jan 10, 2023

I was looking at #14448 and I think we need to do this in progressive steps to get it merged. Here's part 1, which is just a straight refactor of our yaml file being generated by javascript.

Next steps:

  • Incorporate more of WIP: refactor CI completely #14448 (ex. using composable steps... again, this was just a straight ci yaml to js)
  • Have separate build and test workflows.

WPT_FYI_PW: ${{ secrets.WPT_FYI_PW }}
GITHUB_TOKEN: ${{ secrets.DENOBOT_PAT }}
run: |
WPT_FYI_PW: '${{ secrets.WPT_FYI_PW }}'
Copy link
Member

Choose a reason for hiding this comment

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

I'm not so familiar with YAML, but in this situation both sides are equivalent? Adding quotes doesn't change how it's evaluated?

Copy link
Member Author

Choose a reason for hiding this comment

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

'${{ matrix.os }}', name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}', etc. seem to work above, so I assume this works too.

- name: Run benchmarks
if: matrix.job == 'bench' && !startsWith(github.ref, 'refs/tags/')
if: 'matrix.job == ''bench'' && !startsWith(github.ref, ''refs/tags/'')'
Copy link
Member

Choose a reason for hiding this comment

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

This two single quotes looks strange there around bench

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm not sure what I can do with deno_std to get this to be left alone

Copy link
Member Author

Choose a reason for hiding this comment

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

The important thing is more the ci.generate.ts because we're not maintaining this file anymore.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@dsherret dsherret merged commit e246f06 into denoland:main Jan 11, 2023
@dsherret dsherret deleted the generate_ci_by_js branch January 11, 2023 00:16
@iuioiua
Copy link
Collaborator

iuioiua commented Jan 12, 2023

Genuine question: what benefit does generating ci.yml provide?

@dsherret
Copy link
Member Author

@iuioiua YAML is hard to maintain. By generating it instead we can more easily do complex things (ex. do stuff like apply a condition to a group of steps at one time instead of copying and pasting a condition to each step).

@iuioiua
Copy link
Collaborator

iuioiua commented Jan 12, 2023

Ah, I see! Is there any reason why std/yaml is imported via the URL instead of using this repos std submodule? I assume it's to avoid breaking changes.

@dsherret
Copy link
Member Author

I don't think it matters that much. Importing from the url does make it easier to make changes to that file when the std submodule isn't checked out of git.

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.

None yet

3 participants