Repository navigation
CI/BLD: Add development build test workflow #31842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
scottshambaugh
wants to merge
2
commits into
matplotlib:main
Choose a base branch
from
scottshambaugh:test_all_builds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Add development build test workflow
- Loading branch information
commit fc7aba08aa947567c3433b7499828e17c6c50c27
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| --- | ||
| # Exercises the documented build paths from doc/devel/development_setup.rst. | ||
| name: Dev builds | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - v[0-9]+.[0-9]+.x | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| build: | ||
| permissions: | ||
| contents: read | ||
| name: "Dev builds on ${{ matrix.os }}" | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| defaults: | ||
| run: | ||
| # Login shell so the conda environment can be activated in its step. | ||
| shell: bash -el {0} | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 # full history so setuptools-scm can determine the version | ||
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: '3.13' | ||
| cache: pip | ||
| cache-dependency-path: pyproject.toml | ||
|
|
||
| - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0 | ||
| with: | ||
| init-shell: bash | ||
| cache-downloads: true | ||
|
|
||
| - name: Build with venv + pip | ||
| id: venv_pip | ||
| continue-on-error: true | ||
| run: | | ||
| rm -rf build | ||
| python -m venv .venv-pip | ||
| source .venv-pip/bin/activate 2>/dev/null || source .venv-pip/Scripts/activate | ||
| python -m pip install -U pip | ||
| python -m pip install --group dev | ||
| # Strawberry Perl's gcc on PATH shadows MSVC, so --vsenv forces MSVC. | ||
| VSENV=() | ||
| [ "$RUNNER_OS" = Windows ] && VSENV=(--config-settings=setup-args=--vsenv) | ||
| python -m pip install --verbose --no-build-isolation --group dev "${VSENV[@]}" --editable . | ||
| python -c "import matplotlib; print(matplotlib.__file__, matplotlib.__version__)" | ||
|
|
||
| - name: Build with conda + pip | ||
| id: conda | ||
| continue-on-error: true | ||
| run: | | ||
| rm -rf build | ||
| # Create the env here rather than via setup-micromamba's | ||
| # environment-file input, which crashes on environment.yml's | ||
| # nbconvert[execute] spec. | ||
| micromamba create -y -n mpl-dev -f environment.yml | ||
| micromamba activate mpl-dev | ||
| # conda's MSVC setup doesn't run under bash, so --vsenv forces MSVC. | ||
| VSENV=() | ||
| [ "$RUNNER_OS" = Windows ] && VSENV=(--config-settings=setup-args=--vsenv) | ||
| python -m pip install --verbose --no-build-isolation --group dev "${VSENV[@]}" --editable . | ||
| python -c "import matplotlib; print(matplotlib.__file__, matplotlib.__version__)" | ||
|
|
||
| - name: Build with uv pip | ||
| id: uv_pip | ||
| continue-on-error: true | ||
| run: | | ||
| rm -rf build | ||
| uv venv --python 3.13 .venv-uvpip | ||
| source .venv-uvpip/bin/activate 2>/dev/null || source .venv-uvpip/Scripts/activate | ||
| uv pip install --group dev | ||
| VSENV=() | ||
| [ "$RUNNER_OS" = Windows ] && VSENV=(-C setup-args=--vsenv) | ||
| uv pip install --verbose --no-build-isolation --group dev "${VSENV[@]}" --editable . | ||
| python -c "import matplotlib; print(matplotlib.__file__, matplotlib.__version__)" | ||
|
|
||
| - name: Build with uv sync | ||
| id: uv_sync | ||
| continue-on-error: true | ||
| env: | ||
| UV_PROJECT_ENVIRONMENT: .venv-uvsync | ||
| run: | | ||
| rm -rf build | ||
| # Build separately without isolation, since meson-python editable breaks if | ||
| # its build env is deleted. | ||
| uv sync --python 3.13 --group dev --no-install-project | ||
| source .venv-uvsync/bin/activate 2>/dev/null || source .venv-uvsync/Scripts/activate | ||
| VSENV=() | ||
| [ "$RUNNER_OS" = Windows ] && VSENV=(-C setup-args=--vsenv) | ||
| uv pip install --verbose --no-build-isolation --group dev "${VSENV[@]}" --editable . | ||
| python -c "import matplotlib; print(matplotlib.__file__, matplotlib.__version__)" | ||
|
|
||
| - name: Summary | ||
| if: always() | ||
| run: | | ||
| echo "venv + pip : ${{ steps.venv_pip.outcome }}" | ||
| echo "conda : ${{ steps.conda.outcome }}" | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| echo "uv pip : ${{ steps.uv_pip.outcome }}" | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| echo "uv sync : ${{ steps.uv_sync.outcome }}" | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| test "${{ steps.venv_pip.outcome }}" = success \ | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| && test "${{ steps.conda.outcome }}" = success \ | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| && test "${{ steps.uv_pip.outcome }}" = success \ | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| && test "${{ steps.uv_sync.outcome }}" = success | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.