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 reusable actions to create and/or verify a new project #68

Merged
merged 9 commits into from
Nov 18, 2023

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Nov 15, 2023

Changes

  • Introduces a composite action to create a Briefcase project based on a GUI toolkit and optional template
  • Introduces a workflow, app-create-verify.yml, for repos to run in CI that have impacts on project creation
    • Notably, beeware/briefcase-template and beeware/briefcase should implement this

BRIEFCASE_REPO: https://github.com/rmartin16/briefcase
BRIEFCASE_REF: gui-plugin-support
BRIEFCASE_TEMPLATE_REPO: https://github.com/rmartin16/briefcase-template
BRIEFCASE_TEMPLATE_REF: gui-plugin-support

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 create-new-project branch 18 times, most recently from 2f6a58c to d77e116 Compare November 16, 2023 01:41
@rmartin16
Copy link
Member Author

This really creates some chicken and egg problems....

@rmartin16 rmartin16 force-pushed the create-new-project branch 4 times, most recently from a92dfc6 to ea78040 Compare November 16, 2023 02:00
@rmartin16
Copy link
Member Author

So, I'm trying to get to a place where none of the downstream repos need to have project creation config or pre-rolled out apps for CI. I've removed the need for the config...but the rolled apps will be more difficult since they include specific pyproject.toml changes to build the app using the current ref of the repo you're trying to test.

This really seems quite ripe for a plugin that adds template = ../../ to each app format table....

@freakboy3742
Copy link
Member

So, I'm trying to get to a place where none of the downstream repos need to have project creation config or pre-rolled out apps for CI. I've removed the need for the config...but the rolled apps will be more difficult since they include specific pyproject.toml changes to build the app using the current ref of the repo you're trying to test.

This really seems quite ripe for a plugin that adds template = ../../ to each app format table....

I was literally about to break ground on this feature today. tl;dr briefcase create -C template=... so you can override individual app settings at runtime.

@rmartin16 rmartin16 force-pushed the create-new-project branch 5 times, most recently from 577840c to fd87e02 Compare November 16, 2023 22:56
- Use `actions/setup-python` to manage caching for `pip`
- Stop trying to cache Docker images since it would be unreasonable
  anyway given the size of images being used
- Stop caching cookiecutter templates since downloading as part of a
  cache or downloading via `git` from GitHub are effectively the same
- Continue caching the Briefcase data directory
@rmartin16 rmartin16 force-pushed the create-new-project branch 10 times, most recently from d2f6816 to ee00f93 Compare November 17, 2023 22:21
…thon

- At least one of the file from `cache-dependency-path` must exist
…ses`

- Both `app-build-verify` and `app-create-verify` will detect when the
  current repo is `briefcase-template` and will use the `github.workspace`
  as the project template
- All of cases will use the default propject template

test-docs-build-verify:
name: Test Verify Docs Build
name: Verify Docs Build Check
Copy link
Member

Choose a reason for hiding this comment

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

Minor Nit: The task is verifying the docs build; verifying a check is... a bit meta.

Suggested change
name: Verify Docs Build Check
name: Verify Docs Build

Comment on lines 57 to 62
- name: Checkout beeware/briefcase-template
uses: actions/checkout@v4.1.1
with:
repository: rmartin16/briefcase-template # !!!!! TODO:PR: REPLACE ME WITH beeware/briefcase-template !!!!!
ref: gui-plugin-support # !!!!! TODO:PR REMOVE ME !!!!!
path: briefcase-template
Copy link
Member Author

Choose a reason for hiding this comment

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

It isn't clear why I added this....but it definitely isn't necessary now. It should be removed when the updates are made prior to merging.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ohh nvm, i see now. This is needed to install the requirements for linting the project. So, it should stick around.

@rmartin16 rmartin16 marked this pull request as ready for review November 17, 2023 23:24
run: |
cd tests/apps/verify-${{ inputs.framework }}
briefcase create linux system --target fedora:37
briefcase create linux system --target fedora:37 \
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't need to be fixed in this PR, but flagging that Fedora 37 is EOL in 2 weeks, so we're likely going to need to bump this to 38 or 39 soon.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍🏼 I should take care of this in my next round of PRs. I think some of the versions in the templates (e.g. for org.kde.Platform) need bumps as well.

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.

Marking as approved, conditional on changes that are needed as part of the beeware/briefcase#1524 landing strategy

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.

Approved for final ship.

@rmartin16 rmartin16 merged commit 67c0adb into beeware:main Nov 18, 2023
43 of 58 checks passed
@rmartin16 rmartin16 deleted the create-new-project branch November 18, 2023 01:15
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