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 Github action to build NONMATCHING rom #309

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

abaresk
Copy link
Contributor

@abaresk abaresk commented Mar 12, 2024

No description provided.

@abaresk abaresk force-pushed the gh-nonmatching branch 6 times, most recently from 437cd6c to cf6888a Compare March 12, 2024 05:22
@abaresk abaresk force-pushed the gh-nonmatching branch 3 times, most recently from 80d428c to 200640d Compare March 12, 2024 06:17
@red031000
Copy link
Member

if this isn't ready pls mark as draft

@abaresk abaresk marked this pull request as draft March 12, 2024 13:09
@abaresk abaresk force-pushed the gh-nonmatching branch 14 times, most recently from fa61bf0 to 906e2c4 Compare March 14, 2024 04:12
@abaresk abaresk force-pushed the gh-nonmatching branch 2 times, most recently from 5b9d60e to effdc13 Compare March 14, 2024 06:07
@abaresk abaresk marked this pull request as ready for review March 14, 2024 13:50
@abaresk
Copy link
Contributor Author

abaresk commented Mar 14, 2024

Should be ready for review now

Copy link
Member

@red031000 red031000 left a comment

Choose a reason for hiding this comment

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

I have several questions

also the required status check of build is not going to pass, given that you're removed it, so for merging we'll have to switch over what's required before it can be merged

if: |
always() &&
(github.event_name == 'push') &&
contains(join(needs.*.result, ','), 'success')
Copy link
Member

Choose a reason for hiding this comment

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

????

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Safeguard to make sure this only runs if all the build-X jobs succeed.

actions/runner#1251 (comment)

run: make -j${nproc}

- name: Archive build artifacts
if: ${{ always() && env.NONMATCHING == 0 }}
Copy link
Member

Choose a reason for hiding this comment

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

?????

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a step before called "Post error archive", which uploaded an archive of the build. If we still want that, we need always() in case "Build ROM" fails.

The "Post-merge" step is a bit messier if you do it for nonmatching, so I just excluded it.

find . -maxdepth 2 -type d \( -name build -or -name files \) -exec tar -czvhf ${GAME_VERSION}_build.tar.gz {} +

- name: Upload build artifacts
if: ${{ always() && env.NONMATCHING == 0 }}
Copy link
Member

Choose a reason for hiding this comment

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

???????

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same


- name: Build ROM
env:
GAME_VERSION: HEARTGOLD
Copy link
Member

Choose a reason for hiding this comment

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

this only builds non-matching HG? not SS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can add SS -- it wouldn't cost any more time. But the cases where it adds coverage seemed pretty narrow.

I think you'd only get a build error if you don't define a SS-specific data variable. I could only find one in the game: ov74_0223C968

Copy link
Member

Choose a reason for hiding this comment

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

please do add it, it could be useful to have I guess


- name: Webhook
if: ${{ github.event_name == 'push' }}
Copy link
Member

Choose a reason for hiding this comment

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

not needed cause this requires push anyway, right??
did you test whether this works locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole job is guarded now by (github.event_name == 'push').

Copy link
Contributor Author

@abaresk abaresk left a comment

Choose a reason for hiding this comment

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

Yeah we'll have to change the PR policy before this can be merged

run: make -j${nproc}

- name: Archive build artifacts
if: ${{ always() && env.NONMATCHING == 0 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a step before called "Post error archive", which uploaded an archive of the build. If we still want that, we need always() in case "Build ROM" fails.

The "Post-merge" step is a bit messier if you do it for nonmatching, so I just excluded it.

find . -maxdepth 2 -type d \( -name build -or -name files \) -exec tar -czvhf ${GAME_VERSION}_build.tar.gz {} +

- name: Upload build artifacts
if: ${{ always() && env.NONMATCHING == 0 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same


- name: Build ROM
env:
GAME_VERSION: HEARTGOLD
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can add SS -- it wouldn't cost any more time. But the cases where it adds coverage seemed pretty narrow.

I think you'd only get a build error if you don't define a SS-specific data variable. I could only find one in the game: ov74_0223C968

if: |
always() &&
(github.event_name == 'push') &&
contains(join(needs.*.result, ','), 'success')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Safeguard to make sure this only runs if all the build-X jobs succeed.

actions/runner#1251 (comment)


- name: Webhook
if: ${{ github.event_name == 'push' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole job is guarded now by (github.event_name == 'push').

Makes it harder to debug build errors
PikalaxALT
PikalaxALT previously approved these changes Mar 14, 2024
Copy link
Collaborator

@PikalaxALT PikalaxALT left a comment

Choose a reason for hiding this comment

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

lgtm, you clearly have a more thorough understanding of gh actions than the rest of us

@PikalaxALT
Copy link
Collaborator

if you're wondering why this hasn't been merged yet:

  1. merge conflicts
  2. github actions seems to have screwed you over, preventing merge

@red031000
Copy link
Member

if you're wondering why this hasn't been merged yet:

  1. merge conflicts
  2. github actions seems to have screwed you over, preventing merge

I'm still blocking waiting for non-matching SS btw

@abaresk
Copy link
Contributor Author

abaresk commented Apr 28, 2024

I added non-matching Soul Silver. Is it possible to change the settings to merge this, or do I need to restore the build job and delete it after this gets merged?

PikalaxALT
PikalaxALT previously approved these changes May 13, 2024
@PikalaxALT
Copy link
Collaborator

Please resolve conflicts with master

red031000
red031000 previously approved these changes Jun 1, 2024
Copy link
Member

@red031000 red031000 left a comment

Choose a reason for hiding this comment

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

this is fine (sorry didn't realise I was blocking it) but the conflicts need to be fixed

@abaresk abaresk dismissed stale reviews from red031000 and PikalaxALT via 910b488 June 5, 2024 15:47
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.

None yet

3 participants