WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

enable verbose logging for package upload #6

enable verbose logging for package upload

enable verbose logging for package upload #6

Workflow file for this run

name: Upload Packages
on:
workflow_dispatch:
inputs:
tag:
description: 'Git tag to download artifacts from (e.g., v0.45.0)'
required: true
type: string
push:
branches:
- gha/upload_packages_workflow
paths:
- '.github/workflows/upload_packages.yml'
- 'buildscripts/github/find_workflow_runs.py'
- 'buildscripts/github/download_artifacts.py'
concurrency:
group: ${{ github.workflow }}-${{ inputs.tag || github.sha }}
cancel-in-progress: true
jobs:
find-workflow-runs:
name: Find Workflow Runs
runs-on: ubuntu-latest
outputs:
conda_run_id: ${{ steps.find-runs.outputs.conda_run_id }}
wheel_run_ids: ${{ steps.find-runs.outputs.wheel_run_ids }}
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'
- name: Find workflow runs for tag
id: find-runs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Use input tag or default to 'main' for push trigger testing
TAG="${{ inputs.tag || 'main' }}"
# output results to stdout in shell variable format
output=$(./buildscripts/github/find_workflow_runs.py \
--tag "$TAG" \
--repo ${{ github.repository }} \
--token "${{ secrets.GITHUB_TOKEN }}")
echo "$output" >> $GITHUB_OUTPUT
download-artifacts:
name: Download Artifacts
needs: find-workflow-runs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'
- name: Download conda packages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./buildscripts/github/download_artifacts.py \
--run-ids ${{ needs.find-workflow-runs.outputs.conda_run_id }} \
--repo ${{ github.repository }} \
--token "${{ secrets.GITHUB_TOKEN }}" \
--output-dir conda_packages
- name: Download wheels
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./buildscripts/github/download_artifacts.py \
--run-ids ${{ needs.find-workflow-runs.outputs.wheel_run_ids }} \
--repo ${{ github.repository }} \
--token "${{ secrets.GITHUB_TOKEN }}" \
--output-dir dist
- name: List downloaded conda packages
run: |
echo "=== Downloaded Conda Packages ==="
find conda_packages -type f \( -name "*.conda" -o -name "*.tar.bz2" \) -print | sort
echo ""
echo "=== Total conda packages ==="
find conda_packages -type f \( -name "*.conda" -o -name "*.tar.bz2" \) | wc -l
echo ""
- name: List downloaded wheels
run: |
echo "=== Downloaded Wheels ==="
find dist -type f -name "*.whl" -print | sort
echo ""
echo "=== Wheel count by platform ==="
echo "linux-64: $(find dist -type f -name "*manylinux*x86_64*.whl" | wc -l)"
echo "linux-aarch64: $(find dist -type f -name "*manylinux*aarch64*.whl" | wc -l)"
echo "osx-arm64: $(find dist -type f -name "*macosx*arm64*.whl" | wc -l)"
echo "win-64: $(find dist -type f -name "*win_amd64*.whl" | wc -l)"
echo ""
echo "=== Total wheels ==="
find dist -type f -name "*.whl" | wc -l
echo ""
- name: Upload wheels as artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: wheels
path: dist/*.whl
retention-days: 7
- name: Upload conda packages as artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: conda-packages
path: conda_packages/
retention-days: 7
publish-testpypi:
name: Publish to TestPyPI
needs: download-artifacts
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/llvmlite
permissions:
id-token: write
steps:
- name: Download wheels artifact
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: wheels
path: dist
- name: List wheels to publish
run: |
echo "=== Wheels to publish ==="
ls -lh dist/
echo ""
find dist -type f -name "*.whl" | wc -l
- name: Publish wheels to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true