diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 701d125a79..6fcadf184e 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -1,26 +1,37 @@ name: Setup Python description: +# When updating this file, see the comment in ci.yml about integration test +# runner versions. runs: using: composite steps: + # For the default Python version, the micro version should be different to the + # one used by the runtime, because that's required by the integration tests + # `requires_python` and `marker_python_version`. For all other versions, we let + # the GitHub runner pick a micro version, which will be faster because it's + # locally cached. + - name: Get default Python version + id: python-default + shell: bash + run: | + version=3.8 + if [ $RUNNER_OS = Windows ]; then + echo "command=py -$version" + echo "version=3.8.10" + else + echo "command=python$version" + echo "version=3.8.12" + fi >> $GITHUB_OUTPUT + - uses: actions/setup-python@v5.1.0 with: # This should include all major.minor versions supported by the runtime, plus # OLD_BUILD_PYTHON_VERSION, MIN_BUILD_PYTHON_VERSION and # MAX_BUILD_PYTHON_VERSION from test_gradle_plugin. - # - # For the default Python version, the micro version should be different to the - # one used by the runtime, because that's required by the integration tests - # `requires_python` and `marker_python_version`. For all other versions, we let - # the GitHub runner pick a micro version, which will be faster because it's - # locally cached. - # - # When updating this list, see the comment in ci.yml about integration test - # runner versions. python-version: | 3.7 - 3.8.10 + ${{ steps.python-default.outputs.version }} 3.9 3.10 3.11 @@ -28,17 +39,6 @@ runs: 3.13 allow-prereleases: true - - name: Set default Python command - id: python-default - shell: bash - run: | - version=$(target/list-versions.py --default) - if [ $RUNNER_OS = Windows ]; then - echo "command=py -$version" - else - echo "command=python$version" - fi >> $GITHUB_OUTPUT - outputs: python-default: description: Command to run the default Python version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac226a46de..0f029a6e0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ defaults: jobs: product: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: smorimoto/tune-github-hosted-runner-network@v1.0.0 - uses: actions/checkout@v4.1.6 @@ -73,7 +73,7 @@ jobs: docs: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: smorimoto/tune-github-hosted-runner-network@v1.0.0 - uses: actions/checkout@v4.1.6 @@ -105,7 +105,7 @@ jobs: gradlePython: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: smorimoto/tune-github-hosted-runner-network@v1.0.0 - uses: actions/checkout@v4.1.6 @@ -123,7 +123,7 @@ jobs: demo: needs: [product] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: smorimoto/tune-github-hosted-runner-network@v1.0.0 - uses: actions/checkout@v4.1.6 @@ -166,7 +166,7 @@ jobs: # Runners must support all the Python versions in setup-python/action.yml: see # https://github.com/actions/python-versions/blob/main/versions-manifest.json. - os: linux - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 - os: macos runs-on: macos-13 - os: windows diff --git a/target/README.md b/target/README.md index 1df3846d6d..809f442315 100644 --- a/target/README.md +++ b/target/README.md @@ -72,7 +72,6 @@ Update the Python version in all apps in the repository. Update the pythonX.Y scripts in integration/data/BuildPython. -See the note about the default Python micro version in -.github/actions/setup-python/action.yml. +Update .github/actions/setup-python/action.yml. (REST OF LIST TBD)