Skip to content

Commit

Permalink
Add python source build
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicField committed Oct 15, 2024
1 parent ab2043e commit 2b68ae9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/actions/build-python-from-source/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ runs:
choco install --quiet --no-progress openssl
fi
# We do not need to keep building python from source if it is against a tag which is therefore
# unchanging.
- name: Cache the entire checkout and build.
if: "!contains(inputs.python-version, 'alpha')"
uses: actions/cache@v3
uses: actions/cache/restore@v3
id: cpython-cache
with:
path: ${github.workspace}/cpython
Expand Down Expand Up @@ -90,14 +92,14 @@ runs:
./PCbuild/build.bat -e $configure_options
fi
# Update/create the cache.
# Update/create the cache. We force this so even if later parts of the workflow fail
# we do not need to keep rebuilding a headlthy vesion of the python system.
- name: Cache Python build
if: "!contains(inputs.python-version, 'alpha')"
uses: actions/cache@v3
uses: actions/cache/save@v3
with:
path: ${github.workspace}/cpython
key: ${{ runner.os }}-python-${{ inputs.python-version }}-${{ inputs.nogil }}
restore-keys: ${{ runner.os }}-python-${{ inputs.python-version }}-${{ inputs.nogil }}

# Install the built Python version.
- name: Install Python
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ jobs:
run: echo "LOCAL_PYTHON=python" >> $GITHUB_ENV

# Upgrade pip to the latest version.
- name: Upgrade pip
- name: Install/Upgrade pip
shell: bash
run: |
$LOCAL_PYTHON -m ensurepip
$LOCAL_PYTHON -m pip install --upgrade pip
# Make sure Visual Studio build is all in place on Windows.
Expand Down

0 comments on commit 2b68ae9

Please sign in to comment.