WIP: Switch to cyipopt #381
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: PyOptSparse Windows Actions | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
numpy_version: ["1.21.6", "1.25.2", "2.1.3"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: "3.10" | |
channels: conda-forge,defaults | |
channel-priority: strict | |
activate-environment: pyos-build | |
environment-file: .github/environment.yml | |
- name: Install libpgmath | |
shell: bash -l {0} | |
run: | | |
conda activate pyos-build | |
conda install libpgmath | |
- name: Build and install pyoptsparse | |
shell: cmd /C CALL {0} | |
run: | | |
call conda activate pyos-build | |
# We want to use the clang linker `ld-lld.exe` | |
# The conda-forge clang packages set the LD environment variable and LDFLAGS for that linker. | |
# But meson doesn't respect the LD environment variable - so set `<compiler entry>_LD` | |
# https://mesonbuild.com/howtox.html#set-linker | |
set CC_LD=%LD% | |
set CXX_LD=%LD% | |
set FC_LD=%LD% | |
python -m build -n -x . | |
pip install --no-deps --no-index --find-links dist pyoptsparse | |
- name: Install runtime numpy ${{ matrix.numpy_version }} | |
shell: bash -l {0} | |
run: | | |
conda activate pyos-build | |
conda install numpy==${{ matrix.numpy_version }} | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
conda activate pyos-build | |
cd tests | |
testflo --pre_announce -v -n 1 . |