Skip to content

Directivity vis

Directivity vis #43

Workflow file for this run

name: Auto Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: (Ubuntu) system deps for gmsh
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libglu1-mesa-dev libgl1-mesa-dev build-essential
- name: (Windows) Setup C++ compiler for count_reflections
if: matrix.os == 'windows-latest'
run: |
# Try to use existing g++ if available, otherwise try to install MinGW
if (Get-Command g++ -ErrorAction SilentlyContinue) {
echo "g++ is already available"
} else {
# Try to install MinGW via Chocolatey (if available)
if (Get-Command choco -ErrorAction SilentlyContinue) {
choco install mingw -y
$mingwPath = "$env:ChocolateyInstall\lib\mingw\tools\install\mingw64\bin"
if (Test-Path $mingwPath) {
echo "$mingwPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}
} else {
echo "Warning: g++ not found and Chocolatey not available. count_reflections will not be compiled."
echo "This is non-fatal - the package will still work without the C++ optimization."
}
}
- name: Install package + test deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -U pytest
# Build C++ extension via editable install
if [[ "$RUNNER_OS" == "macOS" ]]; then
export ARCHFLAGS="-arch x86_64 -arch arm64"
fi
python -m pip install -e .
shell: bash
- name: Run pytest
run: pytest
# Optional: a smoke run that won't fail CI if plotting/LaTeX is required
- name: Quick example smoke test (non-blocking)
run: |
python -c "print('Import smoke test:'); import deism; print('deism:', getattr(deism, '__version__', 'unknown'))"
shell: bash