Skip to content

Commit 44be6ff

Browse files
authored
Add bare-bones GHA tests (#434)
* add bare-bones GHA tests * different np version * add testing deps * install wheel? * update ubuntu? * change matrix * move cyipopt out of testing req * no longer require cyipopt
1 parent e3b9417 commit 44be6ff

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

.github/build_real.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ fi
1111
mv ~/.config/pip/constraints.txt ~/.config/pip/constraints.txt.bkup
1212
touch ~/.config/pip/constraints.txt
1313

14-
# set $PKG_CONFIG_PATH so pkg-config can find ipopt
15-
# only necessary if IPOPT is installed outside of conda
16-
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$IPOPT_DIR/lib/pkgconfig
17-
1814
pip install .[optview,testing] -v
1915

2016
# move pip constraints file back

.github/workflows/linux-build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PyOptSparse Linux Actions
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build-linux:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 15
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
versions: [{python: "3.10", numpy: "1.22"}, {python: "3.11", numpy: "1.25"}, {python: "3.12", numpy: "2.1"}]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.versions.python }}
24+
- name: Install runtime numpy ${{ matrix.versions.numpy }}
25+
run: |
26+
pip install -U pip wheel
27+
pip install numpy~=${{ matrix.versions.numpy }}
28+
- name: Build and install pyoptsparse
29+
run: |
30+
pip install .['testing']
31+
- name: Run tests
32+
run: |
33+
cd tests
34+
testflo --pre_announce -v -n 1 .

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def copy_shared_libraries():
105105
"matplotlib",
106106
],
107107
"docs": docs_require,
108-
"testing": ["testflo>=1.4.5", "parameterized", "cyipopt"],
108+
"testing": ["testflo>=1.4.5", "parameterized"],
109109
},
110110
classifiers=[
111111
"Development Status :: 5 - Production/Stable",

0 commit comments

Comments
 (0)