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 a basic how-to for building apps in GitHub CI #1980

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Aug 30, 2024

Changes

Notes

  • In the long run, it'll probably be best to abstract a lot of these more complex details away
  • So, this workflow is mostly a stopgap until more infrastructure is in place for user-facing actions to drive Briefcase

Refs #400.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16 rmartin16 force-pushed the how-to-ci branch 2 times, most recently from ece0619 to 320939d Compare August 30, 2024 19:05
@rmartin16 rmartin16 marked this pull request as ready for review August 30, 2024 20:04
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

+1 to the general direction of this. Yes, it's only covers the fairly obvious stuff, but that's an important first step. If we end up developing a re-usable action, then these instructions get simpler; but in the meantime, having something answers a moderately common question.

* So, for a pull request (PR), this is the code being submitted in the PR
* After the PR is merged, this it is the code in your default branch

* Install Python 3.12
Copy link
Member

Choose a reason for hiding this comment

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

Should probably clarify that this example workflow uses 3.12, but you can use any support Python version.

The same set of steps are used for each platform via a `matrix strategy
<https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow>`__.
This will create a separate job for each target platform with specific
configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Could be explicit here about adding other platforms - "this sample packages for macOS, ...; if you wanted to add an Ubuntu 22.04 build, add another matrix entry " etc

${{ matrix.briefcase-args }}

- name: Upload App
if: matrix.target != 'iOS'
Copy link
Member

Choose a reason for hiding this comment

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

Should clarify why this is with a comment.

* Build the test version of the app
* Run the test suite
* Package the release version of the app for the platform
* Upload the distributable artifact created for the platform
Copy link
Member

Choose a reason for hiding this comment

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

Configuring signing etc is ultimately an important step; we might want to (a) add a comment here that artefacts will be unsigned/adhoc-signed, and/or (b) put in a placeholder "how to configure signing" section heading with a link to the manual signing HOWTO instructions.

Copy link
Member

Choose a reason for hiding this comment

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

This can be 400.doc.rst; this is a direct response to the "document CI processes", even if it doesn't completely resolve that issue

@rmartin16
Copy link
Member Author

Beefed this guide up a bit with your recommendations.

@rmartin16
Copy link
Member Author

one more fix inbound; gonna move setting up KVM to pre-command...

@rmartin16
Copy link
Member Author

All right; all edits done now :)

@rmartin16 rmartin16 requested a review from freakboy3742 August 31, 2024 02:15
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Looks great!

@freakboy3742 freakboy3742 merged commit 32f529a into beeware:main Sep 1, 2024
52 checks passed
@rmartin16 rmartin16 deleted the how-to-ci branch September 1, 2024 23:30
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.

2 participants