-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from beeware/auto-dev-python
Enable allow-prereleases on all Python installs.
- Loading branch information
Showing
7 changed files
with
40 additions
and
26 deletions.
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
inputs: | ||
python-version: | ||
description: "Python version to use; defaults to latest Python release." | ||
default: "3.X" | ||
default: "3.x" | ||
type: string | ||
runner-os: | ||
description: "The OS to use to build the App; must be a fully qualified GitHub runner OS, e.g. ubuntu-latest." | ||
|
@@ -82,9 +82,6 @@ jobs: | |
fi | ||
echo "cache-key=$(date +%Y-%m)|${CACHE_KEY}" | tee -a ${GITHUB_OUTPUT} | ||
SYSTEM_PYTHON_VER=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | ||
echo "system-python-version=${SYSTEM_PYTHON_VER}" | tee -a ${GITHUB_OUTPUT} | ||
- name: Checkout ${{ inputs.repository }} | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -111,11 +108,14 @@ jobs: | |
path: ${{ steps.config.outputs.briefcase-data-dir }} | ||
|
||
- name: Set Up Python | ||
# Linux System apps requires python is System Python to run the app | ||
if: ${{ !startsWith(inputs.runner-os, 'ubuntu') || !startsWith(inputs.python-version, steps.config.outputs.system-python-version) }} | ||
# On Linux, accept "system" as a proxy for "don't install Python"; this will | ||
# fall back to the system-provided Python package. Providing "system" as a value | ||
# on macOS or Windows will cause an error. | ||
if: ${{ !startsWith(inputs.runner-os, 'ubuntu') || inputs.python-version != 'system' }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
python-version: ${{ inputs.python-version || '3.x' }} | ||
allow-prereleases: true | ||
cache: pip | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
|
@@ -222,7 +222,7 @@ jobs: | |
- name: Build Linux System Project (Ubuntu, local) | ||
if: > | ||
startsWith(inputs.runner-os, 'ubuntu') | ||
&& startsWith(inputs.python-version, steps.config.outputs.system-python-version) | ||
&& inputs.python-version == 'system' | ||
&& contains(fromJSON('["", "Linux"]'), inputs.target-platform) | ||
&& contains(fromJSON('["", "system"]'), inputs.target-format) | ||
working-directory: ${{ steps.create.outputs.project-path }} | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
inputs: | ||
python-version: | ||
description: "Python version to use; defaults to latest Python release." | ||
default: "3.X" | ||
default: "3.x" | ||
type: string | ||
runner-os: | ||
description: "The OS to use to build the App; must be a fully qualified GitHub runner OS, e.g. ubuntu-latest." | ||
|
@@ -47,6 +47,11 @@ jobs: | |
runs-on: ${{ inputs.runner-os }} | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Workflow Configuration | ||
id: config | ||
run: | | ||
SYSTEM_PYTHON_VER=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | ||
echo "system-python-version=${SYSTEM_PYTHON_VER}" | tee -a ${GITHUB_OUTPUT} | ||
- name: Checkout ${{ inputs.repository }} | ||
uses: actions/[email protected] | ||
|
@@ -68,10 +73,15 @@ jobs: | |
path: briefcase-template | ||
|
||
- name: Set up Python | ||
# On Linux, accept a value of "system", which will install a version of | ||
# Python matching the system version. We can't use the actual system | ||
# install because we need to install dependencies, which would either | ||
# require the use of sudo, or extra workarounds for user-space packages. | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
python-version: ${{ startsWith(inputs.runner-os, 'ubuntu') && inputs.python-version == 'system' && steps.config.outputs.system-python-version || inputs.python-version || '3.x' }} | ||
cache: pip | ||
allow-prereleases: true | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
**/pyproject.toml | ||
|
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 |
---|---|---|
|
@@ -110,7 +110,7 @@ jobs: | |
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.X | ||
python-version: "3.x" | ||
cache: pip | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
|
@@ -261,7 +261,7 @@ jobs: | |
needs: [ pre-commit, test-package-python ] | ||
uses: ./.github/workflows/app-create-verify.yml | ||
with: | ||
python-version: "3.10" # must match system python for ubuntu version | ||
python-version: ${{ matrix.python-version }} # Falls back to 3.x if undefined | ||
repository: beeware/briefcase | ||
runner-os: ${{ matrix.runner-os }} | ||
framework: ${{ matrix.framework }} | ||
|
@@ -270,13 +270,17 @@ jobs: | |
matrix: | ||
framework: [ toga, pyside6 ] | ||
runner-os: [ macos-latest, windows-latest, ubuntu-22.04 ] | ||
includes: | ||
# Ubuntu apps need to run on the system Python | ||
- runner-os: ubuntu-22.04 | ||
python-version: "system" | ||
|
||
test-verify-apps-briefcase: | ||
name: Verify Briefcase | ||
needs: [ pre-commit, test-package-python ] | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.10" # must match system python for ubuntu version | ||
python-version: ${{ matrix.python-version }} # Falls back to 3.x if undefined | ||
repository: beeware/briefcase | ||
runner-os: ${{ matrix.runner-os }} | ||
framework: ${{ matrix.framework }} | ||
|
@@ -285,13 +289,17 @@ jobs: | |
matrix: | ||
framework: [ toga ] | ||
runner-os: [ macos-latest, windows-latest, ubuntu-22.04 ] | ||
includes: | ||
# Ubuntu apps need to run on the system Python | ||
- runner-os: ubuntu-22.04 | ||
python-version: "system" | ||
|
||
test-verify-apps-briefcase-template: | ||
name: Verify Briefcase Template | ||
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
python-version: "3.11" # Explicitly test the python-version override | ||
repository: beeware/briefcase-template | ||
runner-os: ${{ matrix.runner-os }} | ||
framework: ${{ matrix.framework }} | ||
|
@@ -306,7 +314,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-android-gradle-template | ||
runner-os: ${{ matrix.runner-os }} | ||
target-platform: android | ||
|
@@ -323,7 +330,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-iOS-xcode-template | ||
runner-os: macos-latest | ||
target-platform: iOS | ||
|
@@ -339,7 +345,8 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.10" # must match system python for ubuntu version | ||
# Ubuntu apps need to run on the system Python | ||
python-version: "system" | ||
repository: beeware/briefcase-linux-system-template | ||
runner-os: ubuntu-22.04 | ||
target-platform: linux | ||
|
@@ -355,7 +362,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-linux-appimage-template | ||
runner-os: ubuntu-latest | ||
target-platform: linux | ||
|
@@ -372,7 +378,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-linux-flatpak-template | ||
runner-os: ubuntu-latest | ||
target-platform: linux | ||
|
@@ -388,7 +393,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-macos-${{ matrix.format }}-template | ||
runner-os: macos-latest | ||
target-platform: macOS | ||
|
@@ -405,7 +409,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-web-static-template | ||
runner-os: ubuntu-latest | ||
target-platform: web | ||
|
@@ -421,7 +424,6 @@ jobs: | |
needs: pre-commit | ||
uses: ./.github/workflows/app-build-verify.yml | ||
with: | ||
python-version: "3.11" | ||
repository: beeware/briefcase-windows-${{ matrix.format }}-template | ||
runner-os: windows-latest | ||
target-platform: windows | ||
|
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 |
---|---|---|
|
@@ -72,7 +72,7 @@ jobs: | |
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.X | ||
python-version: "3.x" | ||
|
||
- name: Install Dependencies | ||
run: | | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
inputs: | ||
python-version: | ||
description: "Python version to use; defaults to latest Python release." | ||
default: "3.X" | ||
default: "3.x" | ||
type: string | ||
repository: | ||
description: "GitHub repository to checkout; defaults to repo running this workflow." | ||
|
@@ -44,6 +44,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
allow-prereleases: true | ||
cache: pip | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
|
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 |
---|---|---|
|
@@ -75,7 +75,7 @@ jobs: | |
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.X | ||
python-version: "3.x" | ||
cache: pip | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
inputs: | ||
python-version: | ||
description: "Python version to use; defaults to latest Python release." | ||
default: "3.X" | ||
default: "3.x" | ||
type: string | ||
repository: | ||
description: "GitHub repository to checkout; defaults to repo running this workflow." | ||
|
@@ -55,6 +55,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
allow-prereleases: true | ||
cache: pip | ||
cache-dependency-path: | | ||
**/setup.cfg | ||
|