Skip to content

DO NOT MERGE {main-> private} #56

DO NOT MERGE {main-> private}

DO NOT MERGE {main-> private} #56

name: Python test windows
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
env:
PYTHON_LIBRARY_DIR: $Env:CONDA\Lib\site-packages
PYTHON_EXECUTABLE: $Env:CONDA\python.exe
BUILD_TYPE: Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]
os: ["windows-2022"]
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: set dependency direcory
run: echo "DEPENDENCY_DIR=$HOME\github-deps" >> $env:GITHUB_ENV
- name: restore github dependencies from cache
id: cache-github
uses: actions/cache@v4
with:
path: ${{ env.DEPENDENCY_DIR }}
key: ${{runner.os}}-github-deps
- name: create dependency dir
if: steps.cache-github.outputs.cache-hit != 'true'
run: mkdir ${{ env.DEPENDENCY_DIR }}
- name: download eigen
if: steps.cache-github.outputs.cache-hit != 'true'
run: |
cd ${{ env.DEPENDENCY_DIR }}
git clone --depth 1 https://github.com/libigl/eigen.git
- name: install nlopt
if: steps.cache-github.outputs.cache-hit != 'true'
run: |
cd ${{ env.DEPENDENCY_DIR }}
git clone --depth 1 https://github.com/stevengj/nlopt.git
cd nlopt
mkdir build
cd build
cmake ..
cmake --build . --config Release
- name: install gsl
if: steps.cache-github.outputs.cache-hit != 'true'
run: |
cd ${{ env.DEPENDENCY_DIR }}
git clone --depth 1 https://github.com/ampl/gsl.git
cd gsl
mkdir build
cd build
cmake .. -DNO_AMPL_BINDINGS=1
cmake --build . --config Release
- name: set eigen/nlopt/gsl directories
run: |
echo "EIGEN_DIR=${{ env.DEPENDENCY_DIR }}\eigen" >> $env:GITHUB_ENV
echo "NLOPT_DIR=${{ env.DEPENDENCY_DIR }}\nlopt\src\api;${{ env.DEPENDENCY_DIR }}\nlopt\build\Release;${{ env.DEPENDENCY_DIR }}\nlopt\build" >> $env:GITHUB_ENV
echo "GSL_DIR=${{ env.DEPENDENCY_DIR }}\gsl\build\Release;${{ env.DEPENDENCY_DIR }}\gsl\build" >> $env:GITHUB_ENV
- name: build bmds with cmake
shell: pwsh
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release
- name: Install dependencies
run: |
python -m pip install -U pip wheel
python -m pip install -r requirements_dev.txt
- name: Build pybmds
run: |
python setup.py develop
stubgen -p pybmds.bmdscore -o src
ruff format src\pybmds\bmdscore.pyi
python setup.py bdist_wheel
- uses: actions/upload-artifact@v4
with:
path: ./dist/*.whl