-
-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Setup of Package #1
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
Open
johnzhou721
wants to merge
3
commits into
beeware:main
Choose a base branch
from
johnzhou721:initial
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,25 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| # Check for updates on Sunday, 8PM UTC | ||
| interval: "weekly" | ||
| day: "sunday" | ||
| time: "20:00" | ||
|
|
||
| - package-ecosystem: "pip" | ||
| directory: "/" | ||
| schedule: | ||
| # Check for updates on Sunday, 8PM UTC | ||
| interval: "weekly" | ||
| day: "sunday" | ||
| time: "20:00" | ||
|
|
||
| - package-ecosystem: "pip" | ||
| directory: "/testbed" | ||
| schedule: | ||
| # Check for updates on Sunday, 8PM UTC | ||
| interval: "weekly" | ||
| day: "sunday" | ||
| time: "20:00" |
This file contains hidden or 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,117 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| main | ||
| workflow_call: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow}}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| name: Pre-commit checks | ||
| uses: beeware/.github/.github/workflows/pre-commit-run.yml@main | ||
| with: | ||
| pre-commit-source: "--group pre-commit" | ||
|
|
||
| package: | ||
| name: Build Package | ||
| needs: [ pre-commit ] | ||
| runs-on: "ubuntu-latest" | ||
| permissions: | ||
| id-token: write | ||
| attestations: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Build and inspect package | ||
| uses: hynek/build-and-inspect-python-package@v2.14.0 | ||
| with: | ||
| attest-build-provenance-github: 'true' | ||
|
|
||
| test: | ||
| name: Test (${{ matrix.distro }}) | ||
| needs: package | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - distro: ubuntu:25.04 | ||
| install_cmd: | | ||
| apt update | ||
| apt-get install -y \ | ||
| git \ | ||
| python3-pip \ | ||
| python3-venv \ | ||
| tox \ | ||
| python3-pyside6.qtwidgets \ | ||
| kde-style-breeze \ | ||
| python3-torch \ | ||
| build-essential | ||
|
|
||
| - distro: fedora:42 | ||
| install_cmd: | | ||
| dnf install -y \ | ||
| git \ | ||
| python3 \ | ||
| python3-pip \ | ||
| python3-wheel \ | ||
| python3-pyside6 \ | ||
| tox \ | ||
| plasma-breeze-qt6 \ | ||
| python3-torch \ | ||
| python3-devel \ | ||
| gcc \ | ||
| make \ | ||
| pkgconf-pkg-config | ||
|
|
||
| # Technically an update after install | ||
| # is needed to not brick the system; | ||
| # however, this is a container, so do | ||
| # whatever we want to save time. | ||
| # dnf upgrade -y | ||
|
|
||
| - distro: archlinux:base | ||
| install_cmd: | | ||
| pacman -Sy --noconfirm \ | ||
| git \ | ||
| python \ | ||
| python-virtualenv \ | ||
| python-pip \ | ||
| python-tox \ | ||
| breeze \ | ||
| pyside6 \ | ||
| python-pytorch \ | ||
| base-devel | ||
|
|
||
| # Without this, we get an error on ICUi18n: | ||
| # https://www.reddit.com/r/archlinux/comments/1oz6paq/ | ||
| pacman -Syu --noconfirm | ||
|
|
||
| - distro: opensuse/tumbleweed | ||
| install_cmd: | | ||
| zypper refresh | ||
| zypper --non-interactive install \ | ||
| git \ | ||
| python3 \ | ||
| python3-virtualenv \ | ||
| python3-pip \ | ||
| python3-tox \ | ||
| breeze \ | ||
| python3-pytorch \ | ||
| python3-pyside6 \ | ||
| patterns-devel-base-devel_basis \ | ||
| python3-devel | ||
|
|
||
| uses: ./.github/workflows/reusable_tests.yaml | ||
| with: | ||
| distro: ${{ matrix.distro }} | ||
| install_cmd: ${{ matrix.install_cmd }} |
This file contains hidden or 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,15 @@ | ||
| name: Update pre-commit | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 20 * * SUN" # Sunday @ 2000 UTC | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| pre-commit-update: | ||
| name: Update pre-commit | ||
| uses: beeware/.github/.github/workflows/pre-commit-update.yml@main | ||
| secrets: inherit | ||
| with: | ||
| pre-commit-source: "--group pre-commit" | ||
| create-changenote: false |
This file contains hidden or 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,22 @@ | ||
| name: Upload Python Package | ||
|
|
||
| on: | ||
| release: | ||
| types: published | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| # This permission is required for trusted publishing. | ||
| id-token: write | ||
| steps: | ||
| - uses: dsaltares/fetch-gh-release-asset@1.1.2 | ||
| with: | ||
| version: tags/${{ github.event.release.tag_name }} | ||
| file: ${{ github.event.repository.name }}.* | ||
| regex: true | ||
| target: dist/ | ||
|
|
||
| - name: Publish release to production PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains hidden or 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,48 @@ | ||
| name: Create Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| ci: | ||
| name: CI | ||
| uses: ./.github/workflows/ci.yml | ||
|
|
||
| release: | ||
| name: Create Release | ||
| needs: ci | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| # This permission is required for trusted publishing. | ||
| id-token: write | ||
| steps: | ||
| - name: Set build variables | ||
| run: | | ||
| echo "VERSION=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_ENV | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6.0.0 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Get packages | ||
| uses: actions/download-artifact@v6.0.0 | ||
| with: | ||
| pattern: Packages | ||
| path: dist | ||
|
|
||
| - name: Create release | ||
| uses: ncipollo/release-action@v1.20.0 | ||
| with: | ||
| name: ${{ env.VERSION }} | ||
| draft: true | ||
| artifacts: dist/* | ||
| artifactErrorsFailBuild: true | ||
|
|
||
| - name: Publish release to Test PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| repository-url: https://test.pypi.org/legacy/ |
This file contains hidden or 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,66 @@ | ||
| name: Common Workflow | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| distro: | ||
| required: true | ||
| type: string | ||
| install_cmd: | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| venv-test: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ inputs.distro }} | ||
| env: | ||
| QT_STYLE_OVERRIDE: breeze | ||
|
|
||
| steps: | ||
| - name: Dependencies | ||
| run: | | ||
| ${{ inputs.install_cmd }} | ||
|
|
||
| - name: actions/checkout issue 363 workaround | ||
| run: | | ||
| git config --global --add safe.directory $PWD | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| tox -e py | ||
|
|
||
| briefcase-testbed: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ inputs.distro }} | ||
| env: | ||
| QT_STYLE_OVERRIDE: breeze | ||
|
|
||
| steps: | ||
| - name: Dependencies | ||
| run: | | ||
| ${{ inputs.install_cmd }} | ||
|
|
||
| - name: actions/checkout issue 363 workaround | ||
| run: | | ||
| git config --global --add safe.directory $PWD | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install Development Briefcase in venv | ||
| run: | | ||
| python3 -m venv venv | ||
| . venv/bin/activate | ||
| python3 -m pip install git+https://github.com/beeware/briefcase.git | ||
|
|
||
| - name: Run testbed | ||
| run: | | ||
| . venv/bin/activate | ||
| cd testbed | ||
| briefcase run --test |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Not sure why this CI isn't running on here... however it's passing over at johnzhou721#1