Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD: add a windows meson CI job, tweak meson build parameters, fix …
…typo
- Loading branch information
Showing
5 changed files
with
114 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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,86 @@ | ||
name: Test Meson build (Windows) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- maintenance/** | ||
pull_request: | ||
branches: | ||
- main | ||
- maintenance/** | ||
|
||
env: | ||
PYTHON_VERSION: 3.11 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
meson: | ||
name: Meson windows build/test | ||
runs-on: windows-2019 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r build_requirements.txt | ||
- name: openblas-libs | ||
run: | | ||
# Download and install pre-built OpenBLAS library | ||
# with 32-bit interfaces | ||
# Unpack it in the pkg-config hardcoded path | ||
choco install unzip -y | ||
choco install wget -y | ||
choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite | ||
wget https://anaconda.org/multibuild-wheels-staging/openblas-libs/v0.3.21/download/openblas-v0.3.21-win_amd64-gcc_10_3_0.zip | ||
unzip -d c:\opt openblas-v0.3.21-win_amd64-gcc_10_3_0.zip | ||
echo "PKG_CONFIG_PATH=c:\opt\64\lib\pkgconfig;" >> $env:GITHUB_ENV | ||
- name: meson-configure | ||
run: | | ||
meson setup build --prefix=$PWD\build-install -Ddebug=false --optimization 2 --vsenv | ||
- name: meson-build | ||
run: | | ||
meson compile -C build -v | ||
- name: meson-install | ||
run: | | ||
cd build | ||
meson install --no-rebuild | ||
- name: build-path | ||
run: | | ||
echo "installed_path=$PWD\build-install\Lib\site-packages" >> $env:GITHUB_ENV | ||
- name: post-install | ||
run: | | ||
$numpy_path = "${env:installed_path}\numpy" | ||
$libs_path = "${numpy_path}\.libs" | ||
mkdir ${libs_path} | ||
$ob_path = "C:/opt/64/bin/" | ||
cp $ob_path/*.dll $libs_path | ||
# Write _distributor_init.py to load .libs DLLs. | ||
python tools\openblas_support.py --write-init $numpy_path | ||
- name: prep-test | ||
run: | | ||
echo "PYTHONPATH=${env:installed_path}" >> $env:GITHUB_ENV | ||
python -m pip install -r test_requirements.txt | ||
python -m pip install threadpoolctl | ||
- name: test | ||
run: | | ||
mkdir tmp | ||
cd tmp | ||
python -c"import numpy; print(numpy.show_runtime())" | ||
python -c "import numpy; numpy.test(verbose=3)" |
This file contains 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 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 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 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