Skip to content

Updated build for new submodule #3

Updated build for new submodule

Updated build for new submodule #3

Workflow file for this run

name: CI
on:
pull_request:
permissions:
contents: read
jobs:
ubuntu-build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Build distributions
run: |
python -m pip install build
python -m build .
- name: Install wheel into test environment
run: |
python -m venv "$RUNNER_TEMP/spicedmodel-test-venv"
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pip install dist/*.whl pytest
- name: Run installed-package tests
working-directory: ${{ runner.temp }}
env:
MPLCONFIGDIR: ${{ runner.temp }}/matplotlib
run: |
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pytest "$GITHUB_WORKSPACE/tests"
macos-build-and-test:
runs-on: macos-latest
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install OpenMP
run: |
brew install libomp
echo "OpenMP_ROOT=$(brew --prefix libomp)" >> "$GITHUB_ENV"
- name: Build distributions
run: |
python -m pip install build
python -m build .
- name: Install wheel into test environment
run: |
python -m venv "$RUNNER_TEMP/spicedmodel-test-venv"
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pip install dist/*.whl pytest
- name: Run installed-package tests
working-directory: ${{ runner.temp }}
env:
MPLCONFIGDIR: ${{ runner.temp }}/matplotlib
run: |
"$RUNNER_TEMP/spicedmodel-test-venv/bin/python" -m pytest "$GITHUB_WORKSPACE/tests"
windows-msvc-build-and-test:
runs-on: windows-latest
env:
CMAKE_GENERATOR: Visual Studio 17 2022
CMAKE_GENERATOR_PLATFORM: x64
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Build distributions with MSVC
run: |
python -m pip install build
python -m build .
- name: Install wheel into test environment
shell: pwsh
run: |
$venv = Join-Path $env:RUNNER_TEMP "spicedmodel-test-venv"
python -m venv $venv
$python = Join-Path $venv "Scripts/python.exe"
$wheel = Get-ChildItem "dist/*.whl" | Select-Object -First 1
& $python -m pip install $wheel.FullName pytest
- name: Run installed-package tests
shell: pwsh
working-directory: ${{ runner.temp }}
env:
MPLCONFIGDIR: ${{ runner.temp }}/matplotlib
run: |
$python = Join-Path $env:RUNNER_TEMP "spicedmodel-test-venv/Scripts/python.exe"
& $python -m pytest "$env:GITHUB_WORKSPACE/tests"