Repository navigation
Build and test conda packages and wheels #265
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
Open
jharlow-intel
wants to merge
4
commits into
master
Choose a base branch
from
ci/intel-python-ci
base: master
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.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
30f391e
Build and test conda packages and wheels
jharlow-intel 3ba93a4
Read x86 and osx64 as conda-build does, and check $ORIGIN exactly
jharlow-intel 80c013a
Pin the wheels' mkl to the mkl-devel version the build used
jharlow-intel bab5e73
Harden the Linux wheels, record the commit, build 3.15t on pull requests
jharlow-intel 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
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
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
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
This file was deleted.
Oops, something went wrong.
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,192 @@ | ||||||
| # Builds and tests mkl-service's conda packages and wheels, see ci/README.md | ||||||
| name: Intel CI | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: [master] | ||||||
| tags: ['*'] | ||||||
| pull_request: | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
|
|
||||||
| # A push or tag run gets a group of its own, so a queued master push is never dropped. | ||||||
| concurrency: | ||||||
| group: intel-ci-${{ github.event.pull_request.number || github.run_id }} | ||||||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||||||
|
|
||||||
| jobs: | ||||||
| matrix: | ||||||
| name: Platforms and Python versions | ||||||
| runs-on: ${{ vars.GH_CI_RUNNER || 'ubuntu-latest' }} | ||||||
|
antonwolfy marked this conversation as resolved.
Resolved
|
||||||
| timeout-minutes: 10 | ||||||
| outputs: | ||||||
| matrix: ${{ steps.declared.outputs.matrix }} | ||||||
| wheel: ${{ steps.declared.outputs.wheel }} | ||||||
| steps: | ||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
| with: | ||||||
| persist-credentials: false | ||||||
|
|
||||||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||||||
| with: | ||||||
| python-version: "3.14" | ||||||
|
|
||||||
| - name: Read the declared platforms and Python versions | ||||||
| id: declared | ||||||
| run: | | ||||||
| python ci/matrix.py --event "$GITHUB_EVENT_NAME" --github-output matrix | ||||||
| python ci/matrix.py --system wheel --event "$GITHUB_EVENT_NAME" --github-output wheel | ||||||
|
|
||||||
| # macOS runs on Intel runners, as MKL has no Apple silicon build. | ||||||
| build: | ||||||
| name: ${{ matrix.name }} Python ${{ matrix.python }} | ||||||
| needs: matrix | ||||||
| runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }} | ||||||
| timeout-minutes: 90 | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }} | ||||||
| defaults: | ||||||
| run: | ||||||
| shell: bash -el {0} | ||||||
| steps: | ||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
| with: | ||||||
| persist-credentials: false | ||||||
| # The recipe takes its version from git describe. | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| # Miniforge 26.9.4-0 fails setup-miniconda's conda init on Windows runners; 26.7.2-0 works. | ||||||
| - uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0 | ||||||
| with: | ||||||
| miniforge-version: 26.7.2-0 | ||||||
| activate-environment: "" | ||||||
| conda-remove-defaults: "true" | ||||||
|
|
||||||
| - name: Install conda-build | ||||||
| run: conda install -y -q -n base --override-channels -c conda-forge conda-build=26.9.1 | ||||||
|
|
||||||
| - name: Build and run the recipe tests | ||||||
| env: | ||||||
| PYTHON_VERSION: ${{ matrix.python }} | ||||||
| run: python ci/build.py --python "$PYTHON_VERSION" --output "$RUNNER_TEMP/output" | ||||||
|
|
||||||
| - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||||||
| with: | ||||||
| name: mkl-service ${{ matrix.name }} Python ${{ matrix.python }} | ||||||
| path: ${{ runner.temp }}/output/*.conda | ||||||
| if-no-files-found: error | ||||||
| # Pull requests keep them 3 days, tags 30. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the expression gives 3 days to every run that isn't a tag, so packages from pushes to
Suggested change
|
||||||
| retention-days: ${{ startsWith(github.ref, 'refs/tags/') && 30 || 3 }} | ||||||
|
antonwolfy marked this conversation as resolved.
Resolved
|
||||||
|
|
||||||
| test: | ||||||
| name: Test ${{ matrix.name }} Python ${{ matrix.python }} | ||||||
| needs: [matrix, build] | ||||||
|
antonwolfy marked this conversation as resolved.
Resolved
|
||||||
| # Test every package that built, even when another build failed | ||||||
| if: ${{ !cancelled() && needs.matrix.result == 'success' }} | ||||||
| runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }} | ||||||
| timeout-minutes: 45 | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }} | ||||||
| defaults: | ||||||
| run: | ||||||
| shell: bash -el {0} | ||||||
| steps: | ||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
| with: | ||||||
| persist-credentials: false | ||||||
|
|
||||||
| - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | ||||||
| with: | ||||||
| name: mkl-service ${{ matrix.name }} Python ${{ matrix.python }} | ||||||
| path: ${{ runner.temp }}/artifacts | ||||||
|
|
||||||
| - uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0 | ||||||
| with: | ||||||
| miniforge-version: 26.7.2-0 | ||||||
| activate-environment: "" | ||||||
| conda-remove-defaults: "true" | ||||||
|
|
||||||
| - name: Install the package and run ci/test.py | ||||||
| env: | ||||||
| PYTHON_VERSION: ${{ matrix.python }} | ||||||
| EVENT: ${{ startsWith(github.ref, 'refs/tags/') && 'tag' || github.event_name == 'pull_request' && 'pr' || 'push' }} | ||||||
| COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} | ||||||
| run: >- | ||||||
| python ci/hooks.py --python "$PYTHON_VERSION" --artifacts "$RUNNER_TEMP/artifacts" | ||||||
| --work "$RUNNER_TEMP/hooks" --event "$EVENT" --commit "$COMMIT" | ||||||
|
|
||||||
| build-wheel: | ||||||
| name: ${{ matrix.name }} Wheels Python ${{ matrix.python }} | ||||||
| needs: matrix | ||||||
| runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }} | ||||||
| timeout-minutes: 90 | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: ${{ fromJSON(needs.matrix.outputs.wheel) }} | ||||||
| defaults: | ||||||
| run: | ||||||
| shell: bash | ||||||
| steps: | ||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
| with: | ||||||
| persist-credentials: false | ||||||
|
|
||||||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||||||
| with: | ||||||
| python-version: "3.14" | ||||||
|
|
||||||
| - name: Install cibuildwheel | ||||||
| run: python -m pip install --no-input cibuildwheel==4.3.5 | ||||||
|
|
||||||
| - name: Build the wheel | ||||||
| env: | ||||||
| PYTHON_VERSION: ${{ matrix.python }} | ||||||
| run: python ci/build.py --system wheel --python "$PYTHON_VERSION" --output "$RUNNER_TEMP/output" | ||||||
|
|
||||||
| - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | ||||||
| with: | ||||||
| name: mkl-service ${{ matrix.name }} Wheels Python ${{ matrix.python }} | ||||||
| path: ${{ runner.temp }}/output/*.whl | ||||||
| if-no-files-found: error | ||||||
| retention-days: ${{ startsWith(github.ref, 'refs/tags/') && 30 || 3 }} | ||||||
|
|
||||||
| test-wheel: | ||||||
| name: Test ${{ matrix.name }} Wheels Python ${{ matrix.python }} | ||||||
| needs: [matrix, build-wheel] | ||||||
| # Test every package that built, even when another build failed | ||||||
| if: ${{ !cancelled() && needs.matrix.result == 'success' }} | ||||||
| runs-on: ${{ matrix.platform == 'windows' && (vars.GH_CI_WINDOWS_RUNNER || 'windows-2022') || matrix.platform == 'macos' && (vars.GH_CI_MACOS_RUNNER || 'macos-26-intel') || (vars.GH_CI_RUNNER || 'ubuntu-latest') }} | ||||||
| timeout-minutes: 45 | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: ${{ fromJSON(needs.matrix.outputs.wheel) }} | ||||||
| defaults: | ||||||
| run: | ||||||
| shell: bash -el {0} | ||||||
| steps: | ||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
| with: | ||||||
| persist-credentials: false | ||||||
|
|
||||||
| - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 | ||||||
| with: | ||||||
| name: mkl-service ${{ matrix.name }} Wheels Python ${{ matrix.python }} | ||||||
| path: ${{ runner.temp }}/artifacts | ||||||
|
|
||||||
| - uses: conda-incubator/setup-miniconda@be893c923ea9cf1cf7cd510fbdde27c7e18cbdcb # v4.1.0 | ||||||
| with: | ||||||
| miniforge-version: 26.7.2-0 | ||||||
| activate-environment: "" | ||||||
| conda-remove-defaults: "true" | ||||||
|
|
||||||
| - name: Install the wheel and run ci/test.py | ||||||
| env: | ||||||
| PYTHON_VERSION: ${{ matrix.python }} | ||||||
| EVENT: ${{ startsWith(github.ref, 'refs/tags/') && 'tag' || github.event_name == 'pull_request' && 'pr' || 'push' }} | ||||||
| COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} | ||||||
| run: >- | ||||||
| python ci/hooks.py --kind wheel --python "$PYTHON_VERSION" --artifacts "$RUNNER_TEMP/artifacts" | ||||||
| --work "$RUNNER_TEMP/hooks" --event "$EVENT" --commit "$COMMIT" | ||||||
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
Oops, something went wrong.
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.