-
Notifications
You must be signed in to change notification settings - Fork 3
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tagname: | ||
description: Release Tag Name | ||
required: true | ||
type: string | ||
|
||
env: | ||
ACEVER: 0.9.34 | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
env: | ||
ACEFILE: "ace-${{ env.ACEVER }}-x86-64.tar.gz" | ||
OUTFILE: "erg-${{ inputs.tagname }}-x86-64-$ACEVER.dat" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.tagname }} | ||
|
||
- name: Install ACE | ||
run: | | ||
wget "http://sweaglesw.org/linguistics/ace/download/$ACEFILE" | ||
tar xf "$ACEFILE" | ||
./ace-$ACEVER/ace -V | ||
|
||
- name: Compile Grammar | ||
run: | | ||
./ace-$ACEVER/ace -g ace/config.tdl -G "$OUTFILE" | ||
bzip2 "$OUTFILE" | ||
|
||
- name: Upload Release Asset | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload "${{ inputs.tagname }}" "$OUTFILE".bz2 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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:
https
instead ofhttp
. 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.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!