Skip to content

Commit 0462d1a

Browse files
authored
Update pymoose.yml for multi GSL version
1 parent d964ed6 commit 0462d1a

File tree

1 file changed

+34
-22
lines changed

1 file changed

+34
-22
lines changed

.github/workflows/pymoose.yml

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build install test
1+
name: Build and Test
22

33
on: [push]
44

@@ -12,15 +12,20 @@ jobs:
1212
build_type: [Release]
1313
c_compiler: [clang]
1414
python-version: ["3.12"]
15+
gsl_version: ["2.6", "2.7", "2.8"] # Multiple GSL versions
1516
include:
1617
- os: ubuntu-22.04
17-
apt: 10
18+
apt: true
1819
- os: macos-14
19-
brew: 20
20+
brew: true
2021
- os: windows-latest
21-
winget: 30
22+
winget: true
23+
2224
steps:
23-
- name: mamba-setup
25+
- name: Checkout Repository
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Micromamba
2429
uses: mamba-org/setup-micromamba@v1
2530
with:
2631
environment-name: moose
@@ -44,35 +49,42 @@ jobs:
4449
meson
4550
ninja
4651
meson-python
47-
gsl
4852
post-cleanup: all
49-
generate-run-shell: false
50-
- name: Display Python version
51-
run: |
52-
python -c "import sys; print(sys.version)"
53-
- if: ${{ matrix.apt }}
53+
generate-run-shell: false
54+
55+
- name: Install GSL (Linux)
56+
if: matrix.apt
5457
run: |
5558
sudo apt-get update
56-
sudo apt-get -y install libgsl0-dev libgsl-dev libhdf5-dev
57-
- if: ${{ matrix.brew }}
59+
sudo apt-get -y install libgsl-dev libhdf5-dev
60+
61+
- name: Install GSL (MacOS)
62+
if: matrix.brew
5863
run: |
59-
brew list pkg-config && brew uninstall pkg-config || echo "pkg-config not installed, skipping uninstall."
60-
brew list pkg-config@0.29.2 && brew uninstall pkg-config@0.29.2 || echo "pkg-config@0.29.2 not available, skipping uninstall."
61-
brew install gsl
64+
brew install gsl@${{ matrix.gsl_version }}
6265
brew install hdf5
63-
- name: checkout
64-
uses: actions/checkout@v4
65-
- name: Build and install (non-windows)
66-
if: runner.os != 'Windows'
66+
67+
- name: Install GSL (Windows)
68+
if: matrix.winget
69+
run: |
70+
micromamba install gsl=${{ matrix.gsl_version }}
71+
72+
- name: Display Python Version
73+
run: |
74+
python -c "import sys; print(sys.version)"
75+
76+
- name: Build and Install (Non-Windows)
77+
if: runner.os != 'Windows'
6778
run: |
6879
eval "$(micromamba shell hook --shell bash)"
6980
micromamba activate moose
7081
python -c "import sys; print('#' * 60, sys.version)"
7182
pip install python-libsbml
7283
pip install .
7384
python -c "import moose; moose.le()"
74-
- name: Build and install (windows)
75-
if: runner.os == 'Windows'
85+
86+
- name: Build and Install (Windows)
87+
if: runner.os == 'Windows'
7688
run: |
7789
micromamba shell hook -s powershell | Out-String | Invoke-Expression
7890
micromamba activate moose

0 commit comments

Comments
 (0)