Skip to content

github action for windows #38

github action for windows

github action for windows #38

name: Python windows tests
on:
pull_request:
push:
branches:
- main
env:
PYTHON_LIBRARY_DIR: $Env:CONDA\Lib\site-packages
PYTHON_EXECUTABLE: $Env:CONDA\python.exe
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-latest"]
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: download eigen
run: |
cd ${{github.workspace}}\..
git clone --depth 1 https://github.com/libigl/eigen.git
echo "EIGEN_DIR=${{github.workspace}}\..\eigen" >> $env:GITHUB_ENV
- name: install nlopt
run: |
cd ${{github.workspace}}\..
git clone --depth 1 https://github.com/stevengj/nlopt.git
cd nlopt
mkdir build
cd build
cmake ..
cmake --build . --config Release
echo "NLOPT_DIR=${{github.workspace}}\..\nlopt\src\api;${{github.workspace}}\..\nlopt\build\Release;${{github.workspace}}\..\nlopt\build" >> $env:GITHUB_ENV
- name: install gsl
run: |
cd ..
git clone --depth 1 https://github.com/ampl/gsl.git
cd gsl
mkdir build
cd build
cmake ..
cmake --build .
echo "GSL_DIR=${{github.workspace}}\..\gsl\build\Debug;${{github.workspace}}\..\gsl\build" >> $env:GITHUB_ENV
- name: build bmds with cmake
shell: pwsh
run: |
cd ${{github.workspace}}
mkdir build
cd build
cmake ..
cmake --build . --config Release
# - name: try to restore pip cache
# uses: actions/cache@v3
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'requirements_dev.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# - name: Install dependencies
# run: |
# python -m pip install -U pip wheel
# python -m pip install -r requirements_dev.txt
# - name: Check linting
# run: |
# make lint
# - name: Test with pytest
# run: |
# make test