Skip to content

Test Hammer install #158

Test Hammer install

Test Hammer install #158

Workflow file for this run

name: Tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
#container: python:3.10 # optional
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential # Install cmake and build tools
sudo apt-get install libboost-all-dev
- name: Extract Hammer source
run: |
git clone https://gitlab.com/mpapucci/Hammer.git
cd Hammer
git checkout v1.3.0
sed -i '62s|set(Hammer_CompileOptions "${Hammer_CompileOptions} -ansi -D_FILE_OFFSET_BITS=64 -Wno-unknown-pragmas")|set(Hammer_CompileOptions "${Hammer_CompileOptions} -D_FILE_OFFSET_BITS=64 -Wno-unknown-pragmas")|' CMakeModules/CompilerChecks.cmake
cd ..
- name: Build Hammer
run: |
mkdir Hammer-build
cd Hammer-build
cmake -DCMAKE_INSTALL_PREFIX=../Hammer-install -DFORCE_YAMLCPP_INSTALL=ON ../Hammer
make
make install
ls
cd pyext
pip install .
cd ../..
- name: Verify Hammer build
run: |
ls -l Hammer-build
ls -l Hammer-install
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e .
- name: List installed Python packages
run: python -m pip list
- name: Run pre-commit
run: pre-commit run --all-files
- name: Run tests with pytest
run: pytest