-
Notifications
You must be signed in to change notification settings - Fork 39
Move build system to meson-python
#174
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
base: master
Are you sure you want to change the base?
Changes from all commits
503cdce
392d89a
e8255b5
8681c0d
acb1d16
488455e
f6e5526
869a7dc
02fdbbe
a92a577
49fc7be
83838d5
b39b64b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: Build project with standard clang compiler | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [master] | ||
|
|
||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| build-with-standard-clang: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
|
|
||
| env: | ||
| COMPILER_ROOT: /usr/bin | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
|
|
||
| steps: | ||
| - name: Cancel Previous Runs | ||
| uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0 | ||
| with: | ||
| access_token: ${{ github.token }} | ||
|
|
||
| - name: Install Dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y clang | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
| architecture: x64 | ||
|
|
||
| - name: Checkout repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install mkl-service dependencies | ||
| run: | | ||
| pip install meson-python cython cmake ninja mkl-devel | ||
|
|
||
| - name: Build mkl-service | ||
| run: | | ||
| export CC=${{ env.COMPILER_ROOT }}/clang | ||
| pip install . --no-build-isolation --no-deps --verbose | ||
|
|
||
| - name: Run mkl-service tests | ||
| run: | | ||
| pip install pytest | ||
| # mkl-service cannot be installed in editable mode, we need | ||
|
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. We use editable-install in |
||
| # to change directory before importing it and running tests | ||
| cd .. | ||
| pytest -s -v --pyargs mkl | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Editable build using pip | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| permissions: read-all | ||
|
|
||
| env: | ||
| PACKAGE_NAME: mkl-service | ||
| MODULE_NAME: mkl-service | ||
| TEST_ENV_NAME: test_mkl_service | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0 | ||
| with: | ||
| miniforge-version: latest | ||
| channels: conda-forge | ||
| activate-environment: test | ||
| python-version: ${{ matrix.python }} | ||
|
|
||
| - name: Install MKL | ||
| run: | | ||
| conda install mkl-devel mkl | ||
|
|
||
| - name: Build conda package | ||
|
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. Misleading step name |
||
| run: | | ||
| pip install --no-cache-dir meson-python ninja cmake cython | ||
| pip install -e ".[test]" --no-build-isolation --verbose | ||
| pip list | ||
| python -m pytest -v mkl/tests | ||
|
ndgrigorian marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| @rem Remember to activate Intel Compiler, or remove these two lines to use Microsoft Visual Studio compiler | ||
|
|
||
| set MKLROOT=%PREFIX% | ||
| %PYTHON% setup.py build --force install --old-and-unmanageable | ||
| %PYTHON% -m pip install --no-deps --no-build-isolation . | ||
| if errorlevel 1 exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| #!/bin/bash -x | ||
| MKLROOT=$PREFIX $PYTHON setup.py build --force install --old-and-unmanageable | ||
| $PYTHON -m pip install --no-deps --no-build-isolation . | ||
|
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. No error propagation. We should add |
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,14 +18,17 @@ requirements: | |||||
| - {{ compiler('c') }} | ||||||
| - {{ stdlib('c') }} | ||||||
| host: | ||||||
| - meson-python >=0.13.0 | ||||||
|
ndgrigorian marked this conversation as resolved.
|
||||||
| - meson | ||||||
| - cmake | ||||||
| - ninja | ||||||
| - python | ||||||
| - python-gil # [py>=314] | ||||||
| - python-build | ||||||
|
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. Do we need to keep the version pin?
Suggested change
|
||||||
| - pip >=25.0 | ||||||
| - setuptools >=77 | ||||||
| - mkl-devel | ||||||
| - cython | ||||||
| - wheel >=0.45.1 | ||||||
| - python-build >=1.2.2 | ||||||
| run: | ||||||
| - python | ||||||
| - python-gil # [py>=314] | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
setup.pyanymore