Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ jobs:
env:
ADO_PULL_REQUEST_LATEST_COMMIT: HEAD
ADO_PULL_REQUEST_TARGET_BRANCH: $(System.PullRequest.TargetBranch)
WHEELS_OUTPUT_DIR: $(Build.ArtifactStagingDirectory)/wheels-$(python.version)

- task: PublishPipelineArtifact@1
displayName: 'Publish wheels artifacts from tests'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/wheels-$(python.version)'
artifact: 'wheels-$(python.version)'
publishLocation: 'pipeline'
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a condition to only publish artifacts when the wheels directory exists and contains files. This would prevent publishing empty artifacts when no wheels are built or when WHEELS_OUTPUT_DIR is not set.

Copilot uses AI. Check for mistakes.

- job: AzdevStyleModifiedExtensions
displayName: "azdev style on Modified Extensions"
Expand Down
12 changes: 12 additions & 0 deletions scripts/ci/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ def test_source_wheels():
check_output(['python', 'setup.py', 'bdist_wheel', '-q', '-d', built_whl_dir], cwd=s)
except CalledProcessError as err:
raise("Unable to build extension {} : {}".format(s, err))
# Export built wheels so CI can publish them as artifacts
wheels_out_dir = os.environ.get('WHEELS_OUTPUT_DIR')
if wheels_out_dir:
try:
os.makedirs(wheels_out_dir, exist_ok=True)
for fname in os.listdir(built_whl_dir):
src_path = os.path.join(built_whl_dir, fname)
if os.path.isfile(src_path):
shutil.copy2(src_path, os.path.join(wheels_out_dir, fname))
logger.warning(f'Exported wheels to: {wheels_out_dir}')
except Exception as ex:
logger.exception(f'Failed to export wheels to {wheels_out_dir}: {ex}')
shutil.rmtree(built_whl_dir)


Expand Down
Loading