Add EGS LATCH and PENELOPE ILB functions to Python bindings #42
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C/C++ CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone ParticleZoo repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install ROOT framework | |
| run: sudo snap install root-framework | |
| - name: Build and install ParticleZoo library without ROOT support | |
| run: | | |
| ./configure --no-root | |
| make | |
| sudo make install | |
| - name: Verify installation | |
| run: | | |
| PHSPImage --version | |
| PHSPCombine --version | |
| PHSPConvert --version | |
| PHSPSplit --version | |
| PHSPConvert -f | |
| - name: Build and install ParticleZoo library with ROOT support | |
| run: | | |
| sudo make uninstall | |
| make clean | |
| ./configure | |
| make | |
| sudo make install | |
| - name: Verify installation | |
| run: | | |
| PHSPImage --version | |
| PHSPCombine --version | |
| PHSPConvert --version | |
| PHSPSplit --version | |
| PHSPConvert -f | |
| - name: Install Python bindings | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| make install-python | |
| - name: Run Python bindings smoke test | |
| run: | | |
| source .venv/bin/activate | |
| cd python/examples | |
| python write_phase_space.py test.egsphsp | |
| python read_phase_space.py test.egsphsp | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone ParticleZoo repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install ROOT framework | |
| run: brew install root | |
| - name: Build and install ParticleZoo library without ROOT support | |
| run: | | |
| ./configure --no-root | |
| make | |
| sudo make install | |
| - name: Verify installation | |
| run: | | |
| PHSPImage --version | |
| PHSPCombine --version | |
| PHSPConvert --version | |
| PHSPSplit --version | |
| PHSPConvert -f | |
| - name: Build and install ParticleZoo library with ROOT support | |
| run: | | |
| sudo make uninstall | |
| make clean | |
| ./configure | |
| make | |
| sudo make install | |
| - name: Verify installation | |
| run: | | |
| PHSPImage --version | |
| PHSPCombine --version | |
| PHSPConvert --version | |
| PHSPSplit --version | |
| PHSPConvert -f | |
| - name: Install Python bindings | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| make install-python | |
| - name: Run Python bindings smoke test | |
| run: | | |
| source .venv/bin/activate | |
| cd python/examples | |
| python write_phase_space.py test.egsphsp | |
| python read_phase_space.py test.egsphsp | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Clone ParticleZoo repository | |
| uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Cache ROOT framework | |
| id: cache-root | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:\root | |
| key: root-v6.36.04-win64-python311-vc17 | |
| - name: Download and install ROOT framework | |
| if: steps.cache-root.outputs.cache-hit != 'true' | |
| run: | | |
| echo "Downloading and installing ROOT framework..." | |
| curl -sL -o root.zip https://root.cern/download/root_v6.36.04.win64.python311.vc17.zip | |
| echo "Extracting ROOT framework..." | |
| Expand-Archive -Path root.zip -DestinationPath C:\ | |
| shell: pwsh | |
| - name: Add ROOT to PATH | |
| run: echo "C:\root\bin" >> $env:GITHUB_PATH | |
| shell: pwsh | |
| - name: Build and install ParticleZoo library without ROOT support | |
| run: | | |
| .\build.bat install --no-root | |
| echo "$env:LOCALAPPDATA\particlezoo\bin" >> $env:GITHUB_PATH | |
| - name: Verify installation | |
| run: | | |
| PHSPImage --version | |
| PHSPCombine --version | |
| PHSPConvert --version | |
| PHSPSplit --version | |
| PHSPConvert -f | |
| - name: Build and install ParticleZoo library with ROOT support | |
| run: | | |
| .\build.bat install | |
| echo "$env:LOCALAPPDATA\particlezoo\bin" >> $env:GITHUB_PATH | |
| - name: Verify installation | |
| run: | | |
| PHSPImage --version | |
| PHSPCombine --version | |
| PHSPConvert --version | |
| PHSPSplit --version | |
| PHSPConvert -f | |
| - name: Install Python bindings | |
| run: | | |
| python -m venv .venv | |
| .venv\Scripts\Activate.ps1 | |
| python -m pip install python/ | |
| shell: pwsh | |
| - name: Run Python bindings smoke test | |
| run: | | |
| .venv\Scripts\Activate.ps1 | |
| cd python/examples | |
| python write_phase_space.py test.egsphsp | |
| python read_phase_space.py test.egsphsp | |
| shell: pwsh |