-
Notifications
You must be signed in to change notification settings - Fork 21
extend github workflows with build with clang #160
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
Merged
Merged
Changes from all commits
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
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ updates: | |
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "saturday" | ||
rebase-strategy: "disabled" |
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,77 @@ | ||
name: Build project with IntelLLVM clang compiler | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build-with-clang: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python: ["3.9", "3.10", "3.11", "3.12"] | ||
numpy_version: ["numpy'<2'", "numpy'>=2'"] | ||
|
||
env: | ||
ONEAPI_ROOT: /opt/intel/oneapi | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Add Intel repository | ||
run: | | ||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" | ||
sudo apt-get update | ||
|
||
- name: Install Intel OneAPI | ||
run: | | ||
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp | ||
sudo apt-get install intel-oneapi-tbb | ||
sudo apt-get install intel-oneapi-mkl-devel | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
architecture: x64 | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install mkl_fft dependencies | ||
run: | | ||
pip install cython setuptools">=77" | ||
pip install ${{ matrix.numpy_version }} | ||
|
||
- name: List oneAPI folder content | ||
run: ls ${{ env.ONEAPI_ROOT }}/compiler | ||
|
||
- name: Build mkl_fft | ||
run: | | ||
source ${{ env.ONEAPI_ROOT }}/setvars.sh | ||
echo $CMPLR_ROOT | ||
export CC=$CMPLR_ROOT/bin/icx | ||
export CFLAGS="${CFLAGS} -fno-fast-math -O2" | ||
pip install -e . --no-build-isolation --no-deps --verbose | ||
|
||
- name: Run mkl_fft tests | ||
run: | | ||
source ${{ env.ONEAPI_ROOT }}/setvars.sh | ||
pip install scipy mkl-service pytest | ||
pytest -s -v --pyargs mkl_fft |
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 |
---|---|---|
|
@@ -22,13 +22,19 @@ jobs: | |
matrix: | ||
python: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set pkgs_dirs | ||
run: | | ||
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
env: | ||
|
@@ -43,8 +49,10 @@ jobs: | |
|
||
- name: Add conda to system path | ||
run: echo $CONDA/bin >> $GITHUB_PATH | ||
|
||
- name: Install conda-build | ||
run: conda install conda-build | ||
|
||
- name: Build conda package with NumPy 2.0 | ||
run: | | ||
CHANNELS="-c conda-forge --override-channels" | ||
|
@@ -56,6 +64,7 @@ jobs: | |
$VERSIONS \ | ||
$CHANNELS \ | ||
conda-recipe-cf | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -81,10 +90,13 @@ jobs: | |
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python_ver }} | ||
|
||
- name: Add conda to system path | ||
run: echo $CONDA/bin >> $GITHUB_PATH | ||
|
||
- name: Install conda-build | ||
run: conda install conda-build | ||
|
||
- name: Create conda channel | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/channel/linux-64 | ||
|
@@ -97,11 +109,14 @@ jobs: | |
run: | | ||
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" | ||
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME python=${{ matrix.python_ver }} ${{ matrix.numpy }} $CHANNELS --only-deps --dry-run > lockfile | ||
|
||
- name: Display lockfile | ||
run: cat lockfile | ||
|
||
- name: Set pkgs_dirs | ||
run: | | ||
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
env: | ||
|
@@ -120,6 +135,7 @@ jobs: | |
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python_ver }} ${{ matrix.numpy }} $PACKAGE_NAME pytest scipy $CHANNELS | ||
# Test installed packages | ||
conda list -n ${{ env.TEST_ENV_NAME }} | ||
|
||
- name: Run tests | ||
run: | | ||
source $CONDA/etc/profile.d/conda.sh | ||
|
@@ -133,9 +149,15 @@ jobs: | |
matrix: | ||
python: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
|
@@ -181,6 +203,7 @@ jobs: | |
defaults: | ||
run: | ||
shell: cmd /C CALL {0} | ||
|
||
strategy: | ||
matrix: | ||
python_ver: ['3.9', '3.10', '3.11', '3.12'] | ||
|
@@ -227,9 +250,11 @@ jobs: | |
shell: cmd /C CALL {0} | ||
run: | | ||
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json | ||
|
||
- name: Output content of produced ver.json | ||
shell: pwsh | ||
run: Get-Content -Path ${{ env.workdir }}\ver.json | ||
|
||
- name: Collect dependencies | ||
shell: cmd /C CALL {0} | ||
run: | | ||
|
@@ -242,9 +267,11 @@ jobs: | |
SET PACKAGE_VERSION=%%F | ||
) | ||
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python_ver }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile | ||
|
||
- name: Display lockfile content | ||
shell: pwsh | ||
run: Get-Content -Path .\lockfile | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
env: | ||
|
@@ -256,6 +283,7 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_ver }}- | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | ||
|
||
- name: Install mkl_fft | ||
shell: cmd /C CALL {0} | ||
run: | | ||
|
@@ -269,12 +297,14 @@ jobs: | |
) | ||
SET "TEST_DEPENDENCIES=pytest pytest-cov" | ||
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} ${{ matrix.numpy }} scipy -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} | ||
|
||
- name: Report content of test environment | ||
shell: cmd /C CALL {0} | ||
run: | | ||
echo "Value of CONDA enviroment variable was: " %CONDA% | ||
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX% | ||
conda info && conda list -n ${{ env.TEST_ENV_NAME }} | ||
|
||
- name: Run tests | ||
shell: cmd /C CALL {0} | ||
run: >- | ||
|
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 |
---|---|---|
|
@@ -22,13 +22,19 @@ jobs: | |
matrix: | ||
python: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set pkgs_dirs | ||
run: | | ||
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
env: | ||
|
@@ -43,8 +49,10 @@ jobs: | |
|
||
- name: Add conda to system path | ||
run: echo $CONDA/bin >> $GITHUB_PATH | ||
|
||
- name: Install conda-build | ||
run: conda install conda-build | ||
|
||
- name: Build conda package | ||
run: | | ||
CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels" | ||
|
@@ -56,6 +64,7 @@ jobs: | |
$VERSIONS \ | ||
$CHANNELS \ | ||
conda-recipe | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -80,10 +89,13 @@ jobs: | |
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | ||
|
||
- name: Add conda to system path | ||
run: echo $CONDA/bin >> $GITHUB_PATH | ||
|
||
- name: Install conda-build | ||
run: conda install conda-build | ||
|
||
- name: Create conda channel | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/channel/linux-64 | ||
|
@@ -96,11 +108,14 @@ jobs: | |
run: | | ||
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" | ||
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile | ||
|
||
- name: Display lockfile | ||
run: cat lockfile | ||
|
||
- name: Set pkgs_dirs | ||
run: | | ||
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
env: | ||
|
@@ -119,6 +134,7 @@ jobs: | |
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} $PACKAGE_NAME pytest scipy $CHANNELS | ||
# Test installed packages | ||
conda list -n ${{ env.TEST_ENV_NAME }} | ||
|
||
- name: Run tests | ||
run: | | ||
source $CONDA/etc/profile.d/conda.sh | ||
|
@@ -132,9 +148,15 @@ jobs: | |
matrix: | ||
python: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
|
@@ -182,6 +204,7 @@ jobs: | |
defaults: | ||
run: | ||
shell: cmd /C CALL {0} | ||
|
||
strategy: | ||
matrix: | ||
python: ['3.9', '3.10', '3.11', '3.12'] | ||
|
@@ -197,6 +220,7 @@ jobs: | |
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
|
@@ -226,9 +250,11 @@ jobs: | |
shell: cmd /C CALL {0} | ||
run: | | ||
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json | ||
|
||
- name: Output content of produced ver.json | ||
shell: pwsh | ||
run: Get-Content -Path ${{ env.workdir }}\ver.json | ||
|
||
- name: Collect dependencies | ||
shell: cmd /C CALL {0} | ||
run: | | ||
|
@@ -241,9 +267,11 @@ jobs: | |
SET PACKAGE_VERSION=%%F | ||
) | ||
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile | ||
|
||
- name: Display lockfile content | ||
shell: pwsh | ||
run: Get-Content -Path .\lockfile | ||
|
||
- name: Cache conda packages | ||
uses: actions/cache@v4 | ||
env: | ||
|
@@ -255,6 +283,7 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | ||
|
||
- name: Install mkl_fft | ||
shell: cmd /C CALL {0} | ||
run: | | ||
|
@@ -268,6 +297,7 @@ jobs: | |
) | ||
SET "TEST_DEPENDENCIES=pytest pytest-cov" | ||
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} scipy -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} | ||
|
||
- name: Report content of test environment | ||
shell: cmd /C CALL {0} | ||
run: | | ||
|
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.