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 GH action to compile and upload .dat file #51

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

goodmami
Copy link
Member

This adds a GitHub Action script that downloads ACE, compiles the grammar, and uploads the .dat.bz2 file to a specified release. You specify the tag name of the release to use, such as 2023, and it will check out the grammar for that tag and upload to the release of the same tag, assuming the tag and release exist.

Limitations:

  • The action is not configured to run automatically (e.g., upon creating a release), and instead it requires a manual click. We can easily make it automatic later if it works well enough.
  • This only compiles the .dat grammar for Linux using ace-0.9.34; it does not compile for Mac or using PET.
  • It only compiles the ace/config.tdl grammar configuration. Others can be easily added.

@goodmami
Copy link
Member Author

One more thing: This script does not yet retrieve the redwoods.mem file from LFS. Should I do that prior to compiling the grammar?

Speaking of compiling the grammar, currently I only do a call like ace -g ace/config.tdl -G erg.dat: https://github.com/delph-in/erg/pull/51/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34R35

Do you do something different?


- name: Install ACE
run: |
wget "http://sweaglesw.org/linguistics/ace/download/$ACEFILE"
Copy link
Member

Choose a reason for hiding this comment

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

Can we get the files from https://github.com/delph-in/ace? Maybe we can make a release there and use it until better automation in the Ace deploy too.

Copy link
Member Author

Choose a reason for hiding this comment

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

What is the benefit of using the GitHub mirror over Woodley's server?

Copy link
Member

Choose a reason for hiding this comment

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

  1. a more stable link to download. We had problems in the past with Woodley's server being down
  2. a push for DELPH-IN adoption of Git/GitHub
  3. some automation on subsequent releases of Ace (via GitHub actions)
  4. an easier experience for a newcomer showing better integration of the DELPH-IN ecosystem

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for explaining. Some responses:

  1. Some of those problems were user error, like using https instead of http. His server has been fairly reliable in my experience, and I'm not too worried about having to re-run a job because the server happened to be down.
  2. Maybe, but I don't think many people would notice this down in a CI script. And I'd say that sweaglesw.org is still the "official" home of ACE, so I don't know if it makes sense to promote the GitHub repo unless that changes.
  3. I would like to see an action to compile ACE on its GitHub repo, but we would still need to update this script to take advantage of future versions.
  4. Not sure I see how using the GitHub ACE over the sweaglesw ACE achieves the easier experience for a newcomer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@goodmami, I expected to see the Action that you added in the list of Actions on https://github.com/delph-in/erg, but don't yet, so I guess it will appear once you commit your addition to main, yes? The script looks like it will indeed do what I hope for, thanks. Your call to compile the grammar is the same as what I do. I don't think you should have to do anything to retrieve the redwoods.mem file, since I marked it to always be included for download. (I know this costs more in Github data transfer than it would to store that file in some other repository somewhere, but if that starts to get expensive, we can revisit the setup.)

As for ACE, I think it remains best to get it from the place where Woodley maintains it, namely sweagles. If he ever gets won over to using Github, we can adjust, but I agree that sweagles has been pretty reliable over time.

Copy link
Member Author

Choose a reason for hiding this comment

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

@danflick thanks for the feedback. And, yes, the action should appear once this is merged.

The lack of visibility until it's merged makes testing a bit difficult. I was able to use https://github.com/nektos/act/ to test out most steps of this action locally, but I haven't tested the final step that uploads it as a release asset, so we may need to fix something after merging.

Copy link
Member

Choose a reason for hiding this comment

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

I didn't know about this nektosact.com, thank you for sharing!

@goodmami goodmami merged commit 97920c4 into main Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants