Skip to content

[v0.1.0] 2025-09-06 #25

[v0.1.0] 2025-09-06

[v0.1.0] 2025-09-06 #25

name: PyHelios GPU Tests on Linux EC2
on:
push:
branches: [ "master" ]
env:
BUILD_TYPE: Release
permissions:
id-token: write
contents: read
jobs:
start-gpu:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
aws-region: us-west-2
- run: |
aws ec2 start-instances --instance-ids ${{ secrets.EC2_INSTANCE_ID_LINUX }}
aws ec2 wait instance-running --instance-ids ${{ secrets.EC2_INSTANCE_ID_LINUX }}
run_pyhelios_gpu_tests:
runs-on: [self-hosted]
needs: start-gpu
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PyHelios and dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Build PyHelios with all plugins (GPU included)
run: |
# Build with all available plugins including GPU-accelerated ones
./build_scripts/build_helios --clean --plugins radiation,visualizer,weberpenntree
- name: Check plugin status
run: |
python -m pyhelios.plugins status
python -c "from pyhelios.plugins import print_plugin_status; print_plugin_status()"
- name: Run PyHelios GPU tests
run: |
# Run native-only tests that require GPU plugins
if ! pytest -v -m "native_only" --tb=short --log-file=pyhelios_gpu_tests.log; then
echo "==== PyHelios GPU tests failed; dumping pyhelios_gpu_tests.log ===="
cat pyhelios_gpu_tests.log
exit 1
fi
- name: Run comprehensive test suite
run: |
# Run full test suite to ensure nothing is broken
if ! pytest -v --tb=short --log-file=pyhelios_full_tests.log; then
echo "==== PyHelios comprehensive tests failed; dumping pyhelios_full_tests.log ===="
cat pyhelios_full_tests.log
exit 1
fi
- name: Upload test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: pyhelios-gpu-test-logs
path: |
pyhelios_gpu_tests.log
pyhelios_full_tests.log
build_scripts/build.log
stop-gpu:
needs: run_pyhelios_gpu_tests
if: always()
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
aws-region: us-west-2
- run: |
aws ec2 stop-instances --instance-ids ${{ secrets.EC2_INSTANCE_ID_LINUX }}
aws ec2 wait instance-stopped --instance-ids ${{ secrets.EC2_INSTANCE_ID_LINUX }}