another round of improvements

This commit is contained in:
Mikhail Koliada 2022-01-14 19:53:00 +03:00
parent 3792b6282a
commit 41f641758a
2 changed files with 15 additions and 13 deletions

View File

@ -57,7 +57,6 @@ jobs:
submodules: true
- name: Build Python ${{ env.VERSION }}
shell: pwsh
run: |
./builders/build-python.ps1 -Version $env:VERSION `
-Platform ${{ matrix.platform }} -Architecture ${{ matrix.arch }}
@ -120,11 +119,12 @@ jobs:
- name: Apply build artifact to the local machine
run: |
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh }
if ('${{ matrix.platform }}' -ne 'win32') {
cp ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}/build_output.txt ${{ runner.temp }}
}
if ('${{ matrix.platform }}' -eq 'win32') {
powershell ./setup.ps1
} else {
sh ./setup.sh
cp ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}/build_output.txt ${{ runner.temp }}
}
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
- name: Setup Python ${{ env.VERSION }}
@ -133,16 +133,15 @@ jobs:
python-version: ${{ env.VERSION }}
- name: Verbose sysconfig dump
run: |
if ('${{ matrix.platform }}' -ne 'win32') { python ./sources/python-config-output.py }
if: runner.os == 'Linux' || runner.os == 'macOS'
run: python ./sources/python-config-output.py
working-directory: ${{ github.workspace }}/tests
- name: Verbose python binary links
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
$pythonLocation = which python
if ('${{ matrix.platform }}' -ne 'win32') {
if ('${{ matrix.platform }}' -eq 'darwin') { otool -L $pythonLocation } else { ldd $pythonLocation }
}
if ('${{ matrix.platform }}' -eq 'darwin') { otool -L $pythonLocation } else { ldd $pythonLocation }
- name: Run tests
run: |

View File

@ -41,8 +41,11 @@ class PythonBuilder {
PythonBuilder ([semver] $version, [string] $architecture, [string] $platform) {
$this.InstallationTemplatesLocation = Join-Path -Path $PSScriptRoot -ChildPath "../installers"
New-Item -Force -Type Directory (Join-Path $env:RUNNER_TEMP "artifact")
New-Item -Force -Type Directory (Join-Path $env:RUNNER_TEMP "work")
$artifactDirectory = Join-Path $env:RUNNER_TEMP "artifact"
$workDirectory = Join-Path $env:RUNNER_TEMP "work"
New-Item -Force -Type Directory $artifactDirectory
New-Item -Force -Type Directory $workDirectory
$this.HostedToolcacheLocation = $env:RUNNER_TOOL_CACHE
$this.TempFolderLocation = $env:RUNNER_TEMP