Improve codspeed cases naming (#50) #264
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CD | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| tags: [ "v*" ] | ||
| paths-ignore: | ||
| - 'assets/**' | ||
| - 'README.md' | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
| jobs: | ||
| # Tag-only verification | ||
| verify-charts: | ||
| if: github.ref_type == 'tag' | ||
| uses: ./.github/workflows/cd-verify-charts.yaml | ||
| # Build wheels and test them (runs for all events) | ||
| build: | ||
| uses: ./.github/workflows/cd-build.yaml | ||
| # Main branch only: longer-running benchmarks and README assets | ||
| pyperformance: | ||
| if: github.ref == 'refs/heads/main' | ||
| needs: build | ||
| uses: ./.github/workflows/cd-pyperformance-benchmarks.yaml | ||
| update-charts: | ||
|
Check failure on line 30 in .github/workflows/cd.yaml
|
||
| if: github.ref == 'refs/heads/main' | ||
| needs: build | ||
| uses: ./.github/workflows/cd-update-charts.yaml | ||
| # Build sdist (main branch or tag) | ||
| sdist: | ||
| needs: [build, update-charts, verify-charts] | ||
| if: (github.ref == 'refs/heads/main' || github.ref_type == 'tag') && !cancelled() && !failure() | ||
| uses: ./.github/workflows/cd-sdist.yaml | ||
| # Publish to PyPI (main branch or tag) | ||
| # Kept inline as reusing workflows is not supported for PyPI publishing | ||
| publish: | ||
| needs: sdist | ||
| if: (github.ref == 'refs/heads/main' || github.ref_type == 'tag') && !cancelled() && !failure() | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/project/copium | ||
| steps: | ||
| - name: Prepare directories | ||
| run: | | ||
| rm -rf artifacts dist | ||
| mkdir -p artifacts dist | ||
| - name: Download Wheels | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: "Wheels-*" | ||
| path: artifacts | ||
| merge-multiple: true | ||
| - name: Download sdist | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: sdist | ||
| path: artifacts | ||
| - name: Flatten artifacts into ./dist | ||
| shell: bash | ||
| run: | | ||
| shopt -s globstar nullglob | ||
| # Copy wheels and sdists from any artifact subfolder into ./dist | ||
| for f in artifacts/**/*.whl artifacts/**/*.tar.gz; do | ||
| cp -v "$f" dist/ | ||
| done | ||
| echo "Contents of dist:" | ||
| ls -l dist | ||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| packages-dir: dist/ | ||
| skip-existing: true | ||