Skip to content

Updates to docs (fixed) #9

Updates to docs (fixed)

Updates to docs (fixed) #9

Workflow file for this run

name: WallGoCollision build and Python tests
permissions:
pull-requests: read
on:
pull_request:
branches: [ main ]
types: [review_requested, ready_for_review]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# If true, Github will cancel all other jobs in the matrix if any of them fails
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release]
c_compiler: [gcc, clang]
python-version: ["3.12"]
include:
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
exclude:
- os: ubuntu-latest
c_compiler: clang
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
# Define useful strings like the path to build dir
id: strings
shell: bash
run: |
echo "build_dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install os-dependent Collision requirements
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install libgsl-dev libhdf5-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew remove azure-cli
brew update
brew install qt@5 xz ccache zstd webp
brew install gsl hdf5 muparser
else
echo "$RUNNER_OS not supported"
exit 1
fi
pip install "pybind11[global]"
- name: Clone muparser repository
uses: actions/checkout@v4
with:
repository: beltoforion/muparser
path: muparser
- name: Install muparser
# Will install muparser without OpenMP support, our program doesn't need it here. ldconfig seems to be required for linux builds
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
cd muparser && cmake -DENABLE_OPENMP=OFF . && make && sudo make install && cd ..
sudo ldconfig
fi
- name: Configure CMake for Collision
run: >
cmake -B ${{ steps.strings.outputs.build_dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build and install Collision
run: |
cmake --build ${{ steps.strings.outputs.build_dir }} --config ${{ matrix.build_type }}
cmake --install ${{ steps.strings.outputs.build_dir }}
- name: Run Collision QCD examples
run: cd ${{ github.workspace }}/examples && ./bin/QCD && cd ${{ github.workspace }}
- name: Build and install WallGoCollision with pip, including tests
run: pip install -v .[tests]
- name: Test with pytest
run: cd ${{ github.workspace }} && pytest -vs