Update build.yml

This commit is contained in:
Jay Lee
2022-01-25 10:17:17 -05:00
committed by GitHub
parent 2829c4c26a
commit cdcb071826

View File

@ -216,12 +216,14 @@ jobs:
--with-ensurepip=upgrade \ --with-ensurepip=upgrade \
--enable-optimizations \ --enable-optimizations \
--with-lto --with-lto
- name: Windows Get External Python deps - name: Windows Get External Python deps
if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
shell: powershell shell: powershell
run: | run: |
cd "${env:PYTHON_SOURCE_PATH}" cd "${env:PYTHON_SOURCE_PATH}"
PCBuild\get_externals.bat PCBuild\get_externals.bat
- name: Windows overwrite external OpenSSL with local - name: Windows overwrite external OpenSSL with local
if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
shell: powershell shell: powershell
@ -240,6 +242,7 @@ jobs:
cp "$env:OPENSSL_INSTALL_PATH\bin\*" "${env:OPENSSL_EXT_TARGET_PATH}" cp "$env:OPENSSL_INSTALL_PATH\bin\*" "${env:OPENSSL_EXT_TARGET_PATH}"
cp "$env:OPENSSL_INSTALL_PATH\include\openssl\*" "${env:OPENSSL_EXT_TARGET_PATH}\include\openssl\" cp "$env:OPENSSL_INSTALL_PATH\include\openssl\*" "${env:OPENSSL_EXT_TARGET_PATH}\include\openssl\"
cp "$env:OPENSSL_INSTALL_PATH\include\openssl\applink.c" "${env:OPENSSL_EXT_TARGET_PATH}\include\" cp "$env:OPENSSL_INSTALL_PATH\include\openssl\applink.c" "${env:OPENSSL_EXT_TARGET_PATH}\include\"
- name: Windows Install sphinx-build - name: Windows Install sphinx-build
if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
shell: powershell shell: powershell
@ -247,6 +250,7 @@ jobs:
pip install --upgrade pip pip install --upgrade pip
pip install --upgrade sphinx pip install --upgrade sphinx
sphinx-build --version sphinx-build --version
- name: Windows Config/Build Python - name: Windows Config/Build Python
if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
shell: powershell shell: powershell
@ -256,6 +260,7 @@ jobs:
Copy-Item -Path "${env:GITHUB_WORKSPACE}\openssl.props" -Destination PCBuild\ Copy-Item -Path "${env:GITHUB_WORKSPACE}\openssl.props" -Destination PCBuild\
echo "Building for ${env:PYBUILDRELEASE_ARCH}..." echo "Building for ${env:PYBUILDRELEASE_ARCH}..."
PCBuild\build.bat -m --pgo -c Release -p "${env:PYBUILDRELEASE_ARCH}" PCBuild\build.bat -m --pgo -c Release -p "${env:PYBUILDRELEASE_ARCH}"
- name: Windows Install Python - name: Windows Install Python
if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os == 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
shell: powershell shell: powershell
@ -264,21 +269,25 @@ jobs:
mkdir "${env:PYTHON_INSTALL_PATH}\lib" mkdir "${env:PYTHON_INSTALL_PATH}\lib"
Copy-Item -Path "PCBuild\${env:PYEXTERNALS_PATH}\*" "${env:PYTHON_INSTALL_PATH}\" Copy-Item -Path "PCBuild\${env:PYEXTERNALS_PATH}\*" "${env:PYTHON_INSTALL_PATH}\"
Copy-Item -Path "${env:PYTHON_SOURCE_PATH}\Lib\*" "${env:PYTHON_INSTALL_PATH}\lib\" -recurse Copy-Item -Path "${env:PYTHON_SOURCE_PATH}\Lib\*" "${env:PYTHON_INSTALL_PATH}\lib\" -recurse
- name: Mac/Linux Build Python - name: Mac/Linux Build Python
if: matrix.goal == 'build' && matrix.os != 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os != 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
run: | run: |
cd "${PYTHON_SOURCE_PATH}" cd "${PYTHON_SOURCE_PATH}"
echo "Running: ${MAKE} ${MAKEOPT}" echo "Running: ${MAKE} ${MAKEOPT}"
$MAKE $MAKEOPT $MAKE $MAKEOPT
- name: Mac/Linux Install Python - name: Mac/Linux Install Python
if: matrix.goal == 'build' && matrix.os != 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true' if: matrix.goal == 'build' && matrix.os != 'windows-2022' && steps.cache-python-ssl.outputs.cache-hit != 'true'
run: | run: |
cd "${PYTHON_SOURCE_PATH}" cd "${PYTHON_SOURCE_PATH}"
$MAKE altinstall $MAKE altinstall
$MAKE bininstall $MAKE bininstall
- name: Run Python - name: Run Python
run: | run: |
"${PYTHON}" -V "${PYTHON}" -V
- name: Upgrade pip, wheel, etc - name: Upgrade pip, wheel, etc
run: | run: |
curl -O https://bootstrap.pypa.io/get-pip.py curl -O https://bootstrap.pypa.io/get-pip.py
@ -308,8 +317,8 @@ jobs:
- name: Install pip requirements - name: Install pip requirements
run: | run: |
set +e set +e
"${PYTHON}" -m pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U --force-reinstall "${PYTHON}" -m pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $PYTHON -m pip install -U --force-reinstall
"${PYTHON}" -m pip install --upgrade -r requirements.txt "${PYTHON}" -m pip install --upgrade -r src/requirements.txt
- name: Build GAM with PyInstaller - name: Build GAM with PyInstaller
if: matrix.goal != 'test' if: matrix.goal != 'test'