github action for windows #35
Workflow file for this run
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
name: Python windows tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
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: install nlopt | |
# shell: cmd | |
# run: | | |
# :: https://github.com/stevengj/nlopt/tags | |
# git clone --depth 1 --branch v2.7.1 https://github.com/stevengj/nlopt.git | |
# cd nlopt | |
# cmake -DCMAKE_INSTALL_PREFIX=%cd:\=/%/install . | |
# cmake --build . --config Release --target install | |
# ls ${{github.workspace}}\nlopt\install\include | |
# echo "NLOPT_DIR=${{github.workspace}}\nlopt\install\include\" >> $env:GITHUB_ENV | |
# - name: install eigen | |
# shell: pwsh | |
# run: | | |
# # https://gitlab.com/libeigen/eigen/-/tags | |
# git clone --depth 1 --branch 3.4.0 https://gitlab.com/libeigen/eigen.git | |
# ls ${{github.workspace}}\eigen\Eigen\src | |
# echo "EIGEN_DIR=${{github.workspace}}\eigen\Eigen\src" >> $env:GITHUB_ENV | |
# - name: install gsl | |
# shell: pwsh | |
# run: | | |
# Invoke-Expression "$Env:CONDA\shell\condabin\conda-hook.ps1" | |
# conda --version | |
# conda info | |
# # conda install -c conda-forge --yes gsl==2.7 eigen==3.4.0 nlopt==2.7.1 cmake make ninja conda-build | |
# conda install -c conda-forge --yes gsl==2.7 | |
# Invoke-Expression "ls $Env:CONDA\Library" | |
# echo "GSL_DIR=$Env:CONDA\Library" >> $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 .. -DNO_AMPL_BINDINGS=1 | |
cmake --build . | |
echo "GSL_DIR=${{github.workspace}}\..\gsl" >> $env:GITHUB_ENV | |
- name: build bmds with cmake | |
shell: pwsh | |
run: | | |
cd ${{github.workspace}} | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --config Release | |
# - name: Set up Python ${{ matrix.python-version }} | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
# - 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 |