Skip to content

Commit 0565e17

Browse files
committed
added macOs and Windows jobs
1 parent c46315f commit 0565e17

1 file changed

Lines changed: 77 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
contents: read
88

99
jobs:
10-
build-and-test:
10+
ubuntu-build-and-test:
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -37,3 +37,79 @@ jobs:
3737
MPLCONFIGDIR: ${{ runner.temp }}/matplotlib
3838
run: |
3939
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pytest "$GITHUB_WORKSPACE/tests"
40+
41+
macos-build-and-test:
42+
runs-on: macos-latest
43+
44+
steps:
45+
- name: Check out repository
46+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47+
with:
48+
submodules: recursive
49+
50+
- name: Set up Python
51+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
52+
with:
53+
python-version: "3.14"
54+
55+
- name: Install OpenMP
56+
run: |
57+
brew install libomp
58+
echo "OpenMP_ROOT=$(brew --prefix libomp)" >> "$GITHUB_ENV"
59+
60+
- name: Build distributions
61+
run: |
62+
python -m pip install build
63+
python -m build .
64+
65+
- name: Install wheel into test environment
66+
run: |
67+
python -m venv "$RUNNER_TEMP/spicedmodel-test-venv"
68+
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pip install dist/*.whl pytest
69+
70+
- name: Run installed-package tests
71+
working-directory: ${{ runner.temp }}
72+
env:
73+
MPLCONFIGDIR: ${{ runner.temp }}/matplotlib
74+
run: |
75+
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pytest "$GITHUB_WORKSPACE/tests"
76+
77+
windows-msvc-build-and-test:
78+
runs-on: windows-latest
79+
env:
80+
CMAKE_GENERATOR: Visual Studio 17 2022
81+
CMAKE_GENERATOR_PLATFORM: x64
82+
83+
steps:
84+
- name: Check out repository
85+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
86+
with:
87+
submodules: recursive
88+
89+
- name: Set up Python
90+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
91+
with:
92+
python-version: "3.14"
93+
94+
- name: Build distributions with MSVC
95+
run: |
96+
python -m pip install build
97+
python -m build .
98+
99+
- name: Install wheel into test environment
100+
shell: pwsh
101+
run: |
102+
$venv = Join-Path $env:RUNNER_TEMP "spicedmodel-test-venv"
103+
python -m venv $venv
104+
$python = Join-Path $venv "Scripts/python.exe"
105+
$wheel = Get-ChildItem "dist/*.whl" | Select-Object -First 1
106+
& $python -m pip install $wheel.FullName pytest
107+
108+
- name: Run installed-package tests
109+
shell: pwsh
110+
working-directory: ${{ runner.temp }}
111+
env:
112+
MPLCONFIGDIR: ${{ runner.temp }}/matplotlib
113+
run: |
114+
$python = Join-Path $env:RUNNER_TEMP "spicedmodel-test-venv/Scripts/python.exe"
115+
& $python -m pytest "$env:GITHUB_WORKSPACE/tests"

0 commit comments

Comments
 (0)